[Enhancement]: gate auto-increment resets on TN epoch-fence support - #26326
[Enhancement]: gate auto-increment resets on TN epoch-fence support#26326VioletQwQ-0 wants to merge 19 commits into
Conversation
…uto-increment-mixed-version-gate
…uto-increment-mixed-version-gate
aptend
left a comment
There was a problem hiding this comment.
Reviewed exact head c70040799b9754c6543b45a441d6048e411d1174.
The mixed-version safety closure is complete: TN capability is propagated through heartbeat/HAKeeper into the transaction TN snapshot; allocator resets fail closed before SetOffset; epoch-bearing writes monotonically select the V7-only terminal commit method; V6/legacy TNs reject it before commit handling; snapshot application preserves the requirement while restart clears the prior generation; and transport failures retain unknown-result semantics without falling back to legacy Commit. Protobuf changes are additive and missing capability fields decode safely as false.
Focused race stress (-count=100), full owning-package race tests, affected-package vet/build, and current GitHub CI passed. Approved.
|
@VioletQwQ-0 conflict |
…uto-increment-mixed-version-gate # Conflicts: # pkg/pb/logservice/logservice.pb.go
What type of PR is this?
Which issue(s) this PR fixes:
issue #23143
What this PR does / why we need it:
This is the mixed-version prerequisite in the split #25883 plan. It does not add the final ALTER TABLE ... AUTO_INCREMENT=N SQL entry.
Allocator reset must remain disabled unless the transaction can prove that its target TN understands and enforces the AUTO_INCREMENT epoch fence. The final design uses two layers:
The transaction-wide requirement is monotonic across statement rollback and snapshot application, but is cleared for a restarted transaction generation. Row, file, skip-transfer, flush, and compaction paths preserve the allocator generation that actually allocated the values. Commit transport failures retain normal unknown-result semantics and never fall back to the legacy Commit method.
Mixed-version behavior
All protobuf changes are additive. Legacy missing capability fields decode as false.
Validation
git range-diffproves all seven functional commits are unchanged after mergingupstream/main@4a747e44586f09c25bb3b77a8067639c7e8ac346.-race -count=100. Fullpkg/txn/client,pkg/txn/rpc,pkg/vm/engine/disttae,pkg/sql/compile, andpkg/incrserviceowning-package race tests passed.make pbregenerated cleanly with only the intended source/generated V9 contract comment change;pkg/pb/txnandgit diff --checkpass.mo-self-reviewandmo-pr-preflight-review:PASS review=PASS validation=PENDINGatf1c4374ff080ab8dad143a681bc0898ad5033bbf; fresh GitHub CI will run after push.QA
QA is required. Final acceptance belongs to the later SQL integration stage and must cover old/new CN/TN, restart, rolling upgrade, and multi-CN.