Skip to content

Flake: InstanceSyncPushTest.A_pending_content_change_pushes_a_DELETE_when_the_local_node_is_being_deleted times out #1617

Closed as not planned

Description

@rbuergi

Observation

MeshWeaver.InstanceSync.Test.InstanceSyncPushTest.A_pending_content_change_pushes_a_DELETE_when_the_local_node_is_being_deleted failed on run 31835443168 (shard 0):

System.TimeoutException : The operation has timed out.
  at InstanceSyncTestBase.WaitForRemote(...) InstanceSyncTestBase.cs:98
  at InstanceSyncPushTest...() InstanceSyncPushTest.cs:136

Line 136 is the final await WaitForRemote(r => r.Node("theta/doc") is null) — the remote never saw the DELETE.

Not a timing-margin flake

The obvious explanation — exponential backoff outrunning the 30 s wait — is refuted. InstanceSyncTestBase overrides every interval to be tight:

DrainDebounce = 50ms   PullInterval = 200ms
RetryInitial  = 100ms  RetryMax     = 400ms

So the 30 s wait covers roughly 150 pull attempts and 75 retry probes. The drain did not merely arrive late; it never produced a DELETE.

Not attributable to the PR it appeared on

Observed on a branch whose diff is MeshWeaver.Plugin.Build (a build-time CLI) plus a workflow file — no source path to InstanceSync. main is green on 82cd60a81 with all 12 shard jobs passing, including this project.

Hypothesis (NOT verified)

The test's sequence is: go offline → accumulate a content change → RecentlyDeletedRegistry.MarkDeleted("theta/doc") (synchronous, emits no change event) → reconnect → expect the drain to convert the pending push into a DELETE.

A drain attempt that read the local node before MarkDeleted landed could complete after Remote.Unreachable = false, push a stale UPDATE, and clear the pending entry — leaving the remote node present with nothing left to drain. That matches the symptom (no DELETE, no further attempts) and is load-sensitive, since it needs an in-flight attempt straddling the flip.

Stated as a hypothesis: I have not reproduced it or instrumented the drain path.

Suggested next step

flake-repro.yml at ≥100 iterations on this single test would settle both the rate and the hypothesis, and would show whether the drain pushes an UPDATE rather than nothing.

Activity

  1. rbuergi commented on Aug 14, 2026

    @rbuergi
    ContributorAuthor

    Duplicate of #1616 (filed 4 minutes earlier, same test, same failure). Both findings from here — the refuted timing-margin explanation with the actual test-base intervals, and the stale-UPDATE-straddling-the-reconnect hypothesis — are folded into #1616 verbatim, along with the answer to the suggested next step: the isolated flake-repro loop measures 0/40 on main and 0/40 on the branch that had just failed, so it cannot settle this either way. Continue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions