Skip to content

fix: clear writerFailures counter in resetThresholds#1285

Open
0xSkybreaker wants to merge 1 commit into
XiaomiMiMo:mainfrom
0xSkybreaker:pr/issue-734-writer-failures-reset
Open

fix: clear writerFailures counter in resetThresholds#1285
0xSkybreaker wants to merge 1 commit into
XiaomiMiMo:mainfrom
0xSkybreaker:pr/issue-734-writer-failures-reset

Conversation

@0xSkybreaker

Copy link
Copy Markdown

resetThresholds(sessionID) clears crossed and maxCrossed but leaves writerFailures untouched. A session entering a fresh checkpoint threshold cycle after rebuild could inherit stale failure counts, hitting the retry cap prematurely.

Add writerFailures.delete(sessionID) so all per-session checkpoint threshold state resets together.

Includes a test that records failures, calls resetThresholds, then verifies the next cycle starts with a fresh failure count.

Closes: #734

resetThresholds(sessionID) clears crossed and maxCrossed but
leaves writerFailures untouched. A session entering a fresh
checkpoint threshold cycle after rebuild could inherit stale
failure counts, hitting the retry cap prematurely.

Add writerFailures.delete(sessionID) so all per-session checkpoint
threshold state resets together.

Add test that records failures, calls resetThresholds, then
verifies the next cycle starts with a fresh failure count.

Closes: XiaomiMiMo#734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SessionPrune.resetThresholds leaves stale checkpoint writer failure counters

1 participant