Repository navigation
[Store] Give WeightOperationReplay test's OpLog writer room for UnmountSegment - #5179
Merged
Merged
Conversation
…ntSegment The test used a one-entry OpLog writer. With HA on, UnmountSegment queues a stale-handle cleanup per object and then SEGMENT_UNMOUNT back to back, and Reserve() counts committed entries until the writer thread takes them, so these calls fail with TASK_PENDING_LIMIT_EXCEEDED whenever the writer is late. The next weight mutation then fails the same way and the test sees no DEGRADED state. Use 16 entries; each put is still waited on explicitly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0z5a
requested review from
00fish0,
Aionw,
Icedcoco,
Libotry and
YiXR
as code owners
November 3, 2026 02:06
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Aionw
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
MasterServiceHATest.WeightOperationReplayRestoresActiveAndCompletedStatefails intermittently. It failednightly-teston main on 10-29 and 11-02:-1401isTASK_PENDING_LIMIT_EXCEEDED. The test builds its writer withset_oplog_batch_max_entries(1), andOrderedOpLogWriter::ReserveBatch()counts an entry as occupying a slot fromCommit()until the writer thread takes it into a batch.With HA on,
UnmountSegment()cleans up stale handles synchronously. It queues one stale-handle cleanup per object (here the payload and the manifest) and thenSEGMENT_UNMOUNT, all back to back on the caller's thread. EachReserve()succeeds only if the writer thread has already taken the previous entry:SEGMENT_UNMOUNTis dropped with the warning above;ReconcileWeightRevision()cannot persist its mutation for the same reason, so the test never seesDEGRADED.The default capacity is 1024, so this only affects the test setup. The fix gives this test 16 slots. The puts in the test still wait for each entry with
RunCallbacksThrough(), and the comment there is updated, since the writer is no longer single-entry.Testing
On a 72-core aarch64 machine, CPU only, I built
master_service_ha_testat main 7d4670b with and without this change. I ran the test pinned to one core (taskset -c 40), which starves the writer thread:--gtest_filter=*WeightOperationReplay* --gtest_repeat=200-1401lines aboveWith this PR, the whole
master_service_ha_testbinary, also pinned to one core, passes all 138 tests.