Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Store] Give WeightOperationReplay test's OpLog writer room for Unmou…
…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>
  • Loading branch information
0z5a and claude committed Nov 2, 2026
commit 76505352249cf7515657a7e693ddf1bd6847b14b
9 changes: 7 additions & 2 deletions mooncake-store/tests/ha/master_service_ha_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7496,7 +7496,12 @@ TEST_F(MasterServiceHATest,
.set_enable_oplog(true)
.set_weight_management_oplog_capability_confirmed(true)
.set_cluster_id(cluster_id)
.set_oplog_batch_max_entries(1)
// UnmountSegment below queues one stale-handle cleanup
// per object plus SEGMENT_UNMOUNT back to back, before
// the writer thread can take the previous entry. With
// a single slot those Reserve() calls race the writer
// and fail with TASK_PENDING_LIMIT_EXCEEDED.
.set_oplog_batch_max_entries(16)
.build();
MasterService service(config);
auto* writer = InstallGatedWriter(service, backend);
Expand Down Expand Up @@ -7533,7 +7538,7 @@ TEST_F(MasterServiceHATest,
replicate));
ASSERT_TRUE(service.PutEnd(segment.client_id, key, kDefaultTenant,
ReplicaType::MEMORY));
// PutEnd returns before durability; drain the single-entry writer.
// PutEnd returns before durability; wait for this entry to land.
ASSERT_TRUE(writer->RunCallbacksThrough(put_sequence++));
}
const auto ready = service.CommitWeightImport({
Expand Down
Loading