We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4dd9bbe commit 7a19ec0Copy full SHA for 7a19ec0
1 file changed
kv/transaction.go
@@ -232,11 +232,11 @@ func needsTxnCleanup(reqs []*pb.Request) bool {
232
if req == nil || !req.IsTxn {
233
continue
234
}
235
- switch req.Phase {
236
- case pb.Phase_PREPARE, pb.Phase_COMMIT:
+ // Be conservative: any transactional phase other than NONE/ABORT may have
+ // left intents that require cleanup, including unknown enum values that
237
+ // can appear during rolling upgrades.
238
+ if req.Phase != pb.Phase_NONE && req.Phase != pb.Phase_ABORT {
239
return true
- case pb.Phase_NONE, pb.Phase_ABORT:
- continue
240
241
242
return false
0 commit comments