Skip to content

test(firestore): investigate torn membership snapshot during concurrent updates #11397

Description

@ReubenBond

Failure

The Google Cloud provider .NET 8 CI job failed in FirestoreMembershipTableTests.MembershipReadsReturnAtomicSnapshotsDuringConcurrentUpdates on #11374 at f67d5ced4ecb0e7555eb07ac5824095601268a2c.

Job: https://github.com/dotnet/orleans/actions/runs/37091907006/job/111113844321

Assert.Equal() Failure: Values differ
Expected: 3
Actual:   4
at FirestoreMembershipTableTests.<MembershipReadsReturnAtomicSnapshotsDuringConcurrentUpdates>g__ReadSnapshots|5
   FirestoreMembershipTableTests.cs:215
at MembershipReadsReturnAtomicSnapshotsDuringConcurrentUpdates
   FirestoreMembershipTableTests.cs:178,241

The assertion compares snapshot.Version.Version with the updated membership row's ProxyPort. The concurrent writer stores the next table version in that field so the test can detect a mixed committed view. This reader observed table version 3 and row value 4.

Investigation scope

The test concurrently runs both ReadAllAsync and ReadRowAsync through the same ReadSnapshots helper. This stack does not identify which reader returned the inconsistent view. Investigate the Firestore provider/emulator snapshot behavior and improve failure context to distinguish the two read paths.

The job ran 252 tests, with 251 passing and this single failure. Firestore persistence tests passed in the same job. The stack is confined to the membership snapshot test; #11374 changes serializer manifest metadata rather than Firestore membership reads or mutations.

Existing fixes

Both #11311 (a5d7ae657d6a265c694988608daff311e185b22e) and #11342 (8bc9fd244427351ad24ccc039a9e7642a42c1cc4) are already ancestors of the failing branch. #11342 specifically added transactional protection for streamed full-table reads. Searches for the exact failing test and Firestore atomic/snapshot issues found no existing issue tracking this remaining failure.

This issue records the unrelated CI failure for investigation; no Firestore implementation or assertion changes are proposed in the serializer PR.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions