Skip to content

[BACKPORT] vtgate: fix race condition iterating tables and views from schema tracker#118

Merged
austenLacy merged 1 commit intov15.0.3-shopify-5from
austenlacy/backport-vtgate-schema-change-race-condition
Aug 16, 2023
Merged

[BACKPORT] vtgate: fix race condition iterating tables and views from schema tracker#118
austenLacy merged 1 commit intov15.0.3-shopify-5from
austenlacy/backport-vtgate-schema-change-race-condition

Conversation

@austenLacy
Copy link
Copy Markdown

Description

Back ports upstream vitessio#13673. The upstream included some extra handling for views in the vtgate schema tracker, but v15 doesn't have logic so it's excluded here.

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on the CI
  • Documentation was added or is not required

Deployment Notes

@austenLacy austenLacy requested review from BoGs and brendar August 16, 2023 13:33
@austenLacy austenLacy marked this pull request as ready for review August 16, 2023 13:33
@austenLacy austenLacy force-pushed the austenlacy/backport-vtgate-schema-change-race-condition branch from 81609ae to 13d45b4 Compare August 16, 2023 13:55
require (
github.com/bndr/gotabulate v1.1.2
github.com/hashicorp/go-version v1.6.0
golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to add this to for the package used upstream. It also required some version bumps of other libs so we could use the version that doesn't use maps.Clone() since the golang.org/x/exp lib is pretty new.

Thoughts @brendar?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine, but TBH I'm not familiar enough with Go to know the risk of minor version bumps in those packages

Copy link
Copy Markdown

@BoGs BoGs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM the bumps are in golang specific libraries, but I will let Brendan and you hash it out.

@brendar
Copy link
Copy Markdown

brendar commented Aug 16, 2023

@austenLacy I think you'll need to change the base branch for this PR to v15.0.3-shopify-5

@austenLacy austenLacy changed the base branch from v15.0.3-shopify-4 to v15.0.3-shopify-5 August 16, 2023 16:12
@austenLacy austenLacy merged commit 0869e39 into v15.0.3-shopify-5 Aug 16, 2023
@austenLacy austenLacy deleted the austenlacy/backport-vtgate-schema-change-race-condition branch August 16, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants