-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make transaction mode a dynamic configuration #17419
Conversation
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17419 +/- ##
==========================================
- Coverage 67.67% 67.67% -0.01%
==========================================
Files 1583 1584 +1
Lines 254363 254384 +21
==========================================
+ Hits 172140 172143 +3
- Misses 82223 82241 +18 ☔ View full report in Codecov by Sentry. |
@@ -531,7 +531,7 @@ func TestScatterConnSingleDB(t *testing.T) { | |||
assert.Contains(t, errors[0].Error(), want) | |||
|
|||
// TransactionMode_MULTI in txconn. Should not fail. | |||
sc.txConn.mode = vtgatepb.TransactionMode_MULTI | |||
sc.txConn.txMode = &StaticConfig{TxMode: vtgatepb.TransactionMode_MULTI} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GuptaManan100 It looks like the default for StaticConfig
for the DDL settings is different from the default in Vitess, should that always be true by default? We could achieve that by using an initializer function for it instead of a direct struct initialization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, its only being used for the txmode property, and that too mostly in tests (just 1 instancd of vtexplain_vtgate using it other than tests). I think it should be okay to specify them explicitly from the tests.
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Description
This PR makes the changes to allow for transaction mode to be a dynamic configuration.
We already have all the viper changes in place for us to be able to do this. Tests for the same have also been added. I also refactored a little bit of how we create dynamic configs introduced in #17328. The changes allow for us to only instantiate a single dynamic config instance and pass it around everywhere.
While trying to add a
/debug/config
endpoint to vtgate, I found out that one already exists and it already shows the config values there!I also found out that we already log changes in configurations too!
Related Issue(s)
Checklist
Deployment Notes