Skip to content

[Mirror] [ENH] add MCMR property tests and fix dirty log detection (upstream #6835)#3

Open
hashbender wants to merge 20 commits intomainfrom
mirror/upstream-pr-6835
Open

[Mirror] [ENH] add MCMR property tests and fix dirty log detection (upstream #6835)#3
hashbender wants to merge 20 commits intomainfrom
mirror/upstream-pr-6835

Conversation

@hashbender
Copy link
Copy Markdown
Owner

Mirrored from chroma-core#6835 — Multi-region replication tests, Spanner retry logic, dirty log detection fixes

rescrv added 20 commits April 9, 2026 10:42
Introduce dedicated multi-cluster multi-region (MCMR) property tests
that write records across two regions and verify cross-region
replication invariants.  Parameterize existing test_add tests by
database name so they run against both classic and MCMR databases
when multi-region is enabled.

Fix dirty log detection in the repl manifest manager:
- Treat intrinsic_cursor=0 as unset so newly initialized logs are
  not spuriously reported as dirty
- Initialize manifest_regions rows with intrinsic_cursor=0 instead
  of omitting the column, preventing GC from misinterpreting the
  starting offset as an active reader position
- Change the SQL threshold comparison from > to >= so logs at the
  exact threshold boundary are correctly included
- Add decode_intrinsic_cursor helper that filters out zero values

Retry Spanner-aborted flush compaction transactions:
- Add is_spanner_aborted() to SysDbError to detect gRPC Aborted
  status
- Wrap the flush_collection_compaction read-write transaction with
  backon retry (100ms delay, 4 attempts) on Spanner abort
- Propagate gRPC status codes through SysDbError and
  FlushCompactionError instead of mapping all Spanner errors to
  Internal

Improve dirty log test diagnostics by dumping in-memory and Spanner
state on assertion failure.  Add regression tests for single-add and
three-add dirty log scenarios.

Co-authored-by: AI
This reverts commit 0eebd27.
@tenki-reviewer
Copy link
Copy Markdown

tenki-reviewer bot commented Apr 9, 2026

Tenki Code Review - Complete

Files Reviewed: 16
Findings: 0


I reviewed the PR changes across workflow/config updates, property tests, and Rust runtime components, including sysdb Spanner retry logic and WAL manifest dirty-log handling. No confirmed code quality or security issues reachable via current callers were identified.

Files Reviewed (16 files)
.github/actions/tilt/action.yaml
.github/workflows/_python-tests.yml
.github/workflows/nightly-tests.yml
chromadb/test/conftest.py
chromadb/test/property/invariants.py
chromadb/test/property/test_add.py
chromadb/test/property/test_add_mcmr.py
rust/log-service/src/lib.rs
rust/rust-sysdb/src/spanner.rs
rust/rust-sysdb/src/types.rs
rust/sysdb/src/sysdb.rs
rust/wal3/src/interfaces/batch_manager.rs
rust/wal3/src/interfaces/repl/manifest_manager.rs
rust/worker/chroma_config.yaml
rust/worker/chroma_mcmr.yaml
rust/worker/chroma_mcmr2.yaml

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Repository owner deleted a comment from tenki-reviewer bot Apr 9, 2026
@hashbender
Copy link
Copy Markdown
Owner Author

@tenki-reviewer

@tenki-reviewer
Copy link
Copy Markdown

tenki-reviewer bot commented Apr 9, 2026

Tenki Code Review - Complete

Files Reviewed: 16
Findings: 0


I reviewed the PR changes and did not find any actionable code quality or security issues introduced by this diff. The runtime changes appear consistent with current callers and include regression coverage for the updated behavior.

Files Reviewed (16 files)
.github/actions/tilt/action.yaml
.github/workflows/_python-tests.yml
.github/workflows/nightly-tests.yml
chromadb/test/conftest.py
chromadb/test/property/invariants.py
chromadb/test/property/test_add.py
chromadb/test/property/test_add_mcmr.py
rust/log-service/src/lib.rs
rust/rust-sysdb/src/spanner.rs
rust/rust-sysdb/src/types.rs
rust/sysdb/src/sysdb.rs
rust/wal3/src/interfaces/batch_manager.rs
rust/wal3/src/interfaces/repl/manifest_manager.rs
rust/worker/chroma_config.yaml
rust/worker/chroma_mcmr.yaml
rust/worker/chroma_mcmr2.yaml

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.

2 participants