Deprecate twopc_enable flag and change input type for twopc_abandon_age to time.Duration#17279
Conversation
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
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
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17279 +/- ##
==========================================
+ Coverage 67.48% 67.50% +0.02%
==========================================
Files 1577 1577
Lines 253420 253440 +20
==========================================
+ Hits 171022 171088 +66
+ Misses 82398 82352 -46 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
changelog/22.0/22.0.0/summary.md
Outdated
|
|
||
| #### <a id="vttablet-flags"/>Deprecated VTTablet Flags</a> | ||
|
|
||
| - `twopc_enable` flag is deprecated, `twopc_abandonage` flag if set will be used to determine if 2PC is enabled or not. |
There was a problem hiding this comment.
Are we really determining whether to allow 2PC based on twopc_abandonage? Ideally it should be controlled solely by transaction_mode on vtgate, and vttablets should be able to participate.
My suggestion would be to pick a reasonable default for twopc_abandonage and use that. Also we should be changing that to a Duration field instead of float which I assume is being interpreted as seconds.
There was a problem hiding this comment.
I agree with Deepthi. There is no reason to say explicitly whether twopc is enabled or not. If the transaction mode is twopc then we run it, otherwise not.
There was a problem hiding this comment.
For first part - I am aligned with it. Just did not do it in one go.
Changing from seconds to Duration, this would mean a breaking change otherwise would have to add a new flag.
There was a problem hiding this comment.
there's some prior art on how to change this over 2 releases without changing the flag name. you should be able to find the relevant PRs in GH history.
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
78cceef to
49b6cad
Compare
49b6cad to
78cceef
Compare
…lue. Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
twopc_enable flagtwopc_enable flag and change input type for twopc_abandon_age to time.Duration
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Description
This PR deprecate
twopc_enableflag to enable TwoPC.The
twopc_abandonageis still mandatory to be set on VTTablet for TwoPC transactions prepare to work.twopc_abandonagecan take in float (deprecated) and time.Duration as input and default is set to 15 minutes.Related Issue(s)
Checklist
Deployment Notes