Skip to content

CBG-4432: Implement Delete on the BlipTesterClient and enable delete-related topology tests #7251

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

Merged
merged 6 commits into from
Dec 21, 2024

Conversation

bbrks
Copy link
Member

@bbrks bbrks commented Dec 19, 2024

CBG-4432

  • Allows BlipTesterClient to delete docs and push them as tombstones.
  • Enables topology tests utilizing deletes

Integration Tests

Copy link
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.

LGTM generally.

Since the tests that are failing are new, I'd be tempted to disable the TestMultiActorConflictDelete/2x_CBL<->SG<->CBS_XDCR_only_1.3 with a skip with a specific investigation. It might be addressed by Adam's changes?

@@ -314,6 +314,32 @@ func (btcc *BlipTesterCollectionClient) GetDoc(docID string) ([]byte, *DocVersio
return latestRev.body, &latestRev.version
}

// IsTombstoned returns true if the latest version of the doc is a tombstone.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am actually not sure if couchbase lite uses the terminology tombstone? I think this function is fine but I wonder if the name is confusing because we consider having server tombstones, and sync gateway tombstones as separate things and this is neither.

Copy link
Member Author

@bbrks bbrks Dec 20, 2024

Choose a reason for hiding this comment

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

I think tombstone is standard terminology across all of Couchbase for a soft or replicated delete. I'm not sure this is a misuse of the term.

func (btcc *BlipTesterCollectionClient) IsTombstoned(docID string) (bool, error) {
doc, exists := btcc.getClientDoc(docID)
if !exists {
return false, base.ErrNotFound
Copy link
Collaborator

Choose a reason for hiding this comment

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

is wrapping these errors with the docid going to be helpful if they fail?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so. The caller knows the doc ID and can choose to log it/wrap it at that point

@adamcfraser adamcfraser merged commit 61b0628 into release/anemone Dec 21, 2024
36 checks passed
@adamcfraser adamcfraser deleted the CBG-4432 branch December 21, 2024 00:21
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