Skip to content

CBG-6225: Only push changes newer than since in BlipTesterClient - #9186

Open
torcolvin wants to merge 1 commit into
mainfrom
CBG-6225
Open

torcolvin wants to merge 1 commit into
mainfrom
CBG-6225

Conversation

@torcolvin

@torcolvin torcolvin commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

CBG-6225

  • OneShotChangesSince started at the since sequence, so each round of a continuous push proposed the last change it sent again, and Sync Gateway answered 304. Start at since+1, as Couchbase Lite does.

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

🤖 Generated with Claude Code

OneShotChangesSince started at the since sequence, so each round of a
continuous push proposed the last change it sent again, and Sync Gateway
answered 304. Start at since+1, as Couchbase Lite does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@torcolvin
torcolvin requested review from a team December 4, 2026 15:28
@torcolvin torcolvin self-assigned this Dec 4, 2026
Copilot AI balanced review requested due to automatic review settings December 4, 2026 15:28
@factory-droid

factory-droid Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

🟢 Looks good to merge

No issues found in 89b5b50. LGTM. This change makes OneShotChangesSince propose only sequences newer than `since`, avoiding re-sending the last already-sent change (and the resulting 304) in continuous push runs.

🔒 Security review: no findings.

What changed

Updated BlipTesterCollectionClient's OneShotChangesSince iteration to start at since+1, and clarified the changesSince comment to match the "newer than" behavior.

Area Files Summary
BLIP test utilities rest/​utilities_testing_blip_client.go Start OneShotChangesSince iteration at since+1 to avoid re-proposing the since sequence.

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.

🟡 Changes recommended

The tests do not verify that OneShotChangesSince(ctx, 1) excludes sequence 1 while yielding sequence 2. The iterator test starts at 0, and the nonzero-since test has no newer changes, so neither protects against regression of the inclusive-boundary bug this change fixes.

1 open issue
What changed in this PR

Fixes duplicate change proposals in Sync Gateway’s BLIP test client by excluding the last-sent sequence.

Changes:

  • Starts iteration at since + 1.
  • Clarifies the changesSince comment to describe the exclusive boundary.
File Description
rest/​utilities_testing_blip_client.go Excludes the since sequence and clarifies the iterator’s documented behavior.

Review effort: Balanced

Comment thread rest/utilities_testing_blip_client.go Resolved
@torcolvin torcolvin assigned gregns1 and unassigned torcolvin Dec 4, 2026

This branch has not been deployed

No deployments
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