Skip to content

CBG-1903: enable TestPushReplicationAPIUpdateDatabase - #8851

Merged
gregns1 merged 2 commits into
mainfrom
CBG-1903
Oct 8, 2026
Merged

gregns1 merged 2 commits into
mainfrom
CBG-1903

Conversation

@torcolvin

@torcolvin torcolvin commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

CBG-1903: enable TestPushReplicationAPIUpdateDatabase

Reload the passive database several times underneath a push replication while documents are still being written on the active side, and check that the replicator reconnects and delivers every document with no write failures.

  • use subtest-safe names for the replication and document IDs
  • write documents from a wg.Go goroutine with a jittered throttle
  • reload with ServerContext.ReloadDatabase
  • wait with SGRTestRunner.WaitForDocReplicated and WaitForChanges

There is still a problem with setting Bucket = nil but I could not get this test reproduce that problem. I'm tempted to fix that in a separate ticket but I don't think it needs to be here.

Pre-review checklist

  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Integration Tests

@torcolvin
torcolvin requested review from a team and a balanced review from Copilot October 5, 2026 18:19
@factory-droid

factory-droid Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Droid finished @torcolvin's task —— View job


Droid review (Pass 2: validation)

No candidate inline comments were provided for PR #8851, so there is nothing to post. The changes appear consistent with the intent to validate ISGR push replication reconnection and full document delivery during repeated passive DB reloads.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Each reload must wait for a newly written document rather than potentially rechecking an earlier write.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Enables and expands the passive-database reload test for continuous push replication.

Changes:

  • Runs the test across both replication protocols.
  • Adds concurrent jittered writes and repeated reloads.
  • Verifies document delivery and replication status.
File Description
rest/​replicatortest/​replicator_test.go Strengthens the push-replication reload test.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rest/replicatortest/replicator_test.go
@torcolvin

Copy link
Copy Markdown
Collaborator Author

This exposed #8854 / CBG-5951 - I don't think I should push this change until we resolve that.

@torcolvin torcolvin self-assigned this Oct 6, 2026
torcolvin and others added 2 commits October 6, 2026 21:12
Reload the passive database several times underneath a push replication
while documents are still being written on the active side, and check
that the replicator reconnects and delivers every document with no
write failures.

- use subtest-safe names for the replication and document IDs
- write documents from a wg.Go goroutine with a jittered throttle
- reload with ServerContext.ReloadDatabase
- wait with SGRTestRunner.WaitForDocReplicated and WaitForChanges

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gregns1
gregns1 merged commit e854f16 into main Oct 8, 2026
49 checks passed
@gregns1
gregns1 deleted the CBG-1903 branch October 8, 2026 14:22
torcolvin added a commit that referenced this pull request Oct 12, 2026
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

3 participants