-
Notifications
You must be signed in to change notification settings - Fork 140
CBG-4905: update defualt resolver for blip tester #7907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the default conflict resolver for the BLIP tester to handle tombstones when resolving conflicts. The changes ensure that when either the local or remote document is a tombstone, the conflict resolution favors the non-deleted document.
- Updated
_resolveConflictLWWto prioritize non-deleted documents over tombstones during conflict resolution - Added helper functions to determine when conflicts are expected in CBL topologies
- Modified resurrection test logic to handle tombstone convergence when CBL resolves in favor of its own tombstone
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| rest/utilities_testing_blip_client.go | Enhanced conflict resolver to check for tombstones and prefer non-deleted documents |
| topologytest/peer_test.go | Added helper functions to identify server-side peers and determine expected conflicts in CBL topologies |
| topologytest/multi_actor_no_conflict_test.go | Updated resurrection test to wait for tombstone convergence when CBL conflicts are expected |
| if delPeerName == "cbl1" { | ||
| // cbl delete will mean cbs resurrect has a conflict |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider using strings.Contains(delPeerName, \"cbl\") or a constant for "cbl1" to avoid hardcoding the peer name and improve maintainability.
| if delPeerName == "cbl1" { | |
| // cbl delete will mean cbs resurrect has a conflict | |
| // If the delete peer is a Couchbase Lite peer, conflict is expected. | |
| if strings.HasPrefix(delPeerName, "cbl") { |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
CBG-4905
Pre-review checklist
fmt.Print,log.Print, ...)base.UD(docID),base.MD(dbName))docs/apiDependencies (if applicable)
Integration Tests
GSI=true,xattrs=truehttps://jenkins.sgwdev.com/job/SyncGatewayIntegration/183/