Skip to content

CBG-4905: update defualt resolver for blip tester#7907

Merged
torcolvin merged 8 commits intomainfrom
CBG-4905
Dec 9, 2025
Merged

CBG-4905: update defualt resolver for blip tester#7907
torcolvin merged 8 commits intomainfrom
CBG-4905

Conversation

@gregns1
Copy link
Copy Markdown
Contributor

@gregns1 gregns1 commented Dec 1, 2025

CBG-4905

  • Alter blip tester client to account for local or remote tombstones when resolving conflict.
  • Required changes to the resurrection testing to account for CBL peer resolving in favour of a tombstone

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • 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

Dependencies (if applicable)

  • Link upstream PRs
  • Update Go module dependencies when merged

Integration Tests

Copilot AI review requested due to automatic review settings December 1, 2025 15:59
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 _resolveConflictLWW to 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

Comment thread topologytest/peer_test.go Outdated
Comment thread topologytest/peer_test.go Outdated
Comment thread topologytest/multi_actor_no_conflict_test.go Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread rest/utilities_testing_blip_client.go
Comment thread rest/utilities_testing_blip_client.go Outdated
Comment thread topologytest/peer_test.go Outdated
@torcolvin torcolvin assigned gregns1 and unassigned torcolvin Dec 4, 2025
@gregns1 gregns1 assigned torcolvin and unassigned gregns1 Dec 8, 2025
Copy link
Copy Markdown
Collaborator

@torcolvin torcolvin left a comment

Choose a reason for hiding this comment

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

Make sure to run topologytests with CBS (you can do this locally with SG_TEST_TOPOLOGY_TESTS=true or with jenkins job, https://jenkins.sgwdev.com/job/TopologyTests/)

Comment thread rest/utilities_testing_blip_client.go Outdated
newBody, updatedHLV = btcc._resolveConflict(opts.incomingHLV, opts.body, doc._latestRev(btcc.TB()))
newBody, updatedHLV, isTombstone = btcc._resolveConflict(opts.incomingHLV, opts.body, opts.isDelete, doc._latestRev(btcc.TB()))
if isTombstone {
opts.isDelete = true
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

one tweak and I think I'm fine with this, I think I declare:

isDelete := opts.isDelete

And then use that variable to use a local variable. The reason for this is to match newBody and newVersion behavior and to make the options struct effectively immutable to make this easier to do debugging.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Pushed update for this but I can't get onto Jenkins with this netspoke stuff. Going to bring this up to IT soon.

@torcolvin torcolvin assigned gregns1 and unassigned torcolvin Dec 8, 2025
@torcolvin torcolvin merged commit d57346b into main Dec 9, 2025
74 of 76 checks passed
@torcolvin torcolvin deleted the CBG-4905 branch December 9, 2025 15:45
gregns1 added a commit that referenced this pull request Dec 12, 2025
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