Skip to content
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

CBG-3392 match CAS checks for xattrs like CBS does #18

Merged
merged 1 commit into from
Nov 21, 2023
Merged

CBG-3392 match CAS checks for xattrs like CBS does #18

merged 1 commit into from
Nov 21, 2023

Conversation

torcolvin
Copy link
Collaborator

This matches CBS behavior and allows all SG tests to pass.

I found the logic in checkCASXattr to be really confusing and I'm not sure how to make it easier.

Formerly, a document was declared a tombstone based on whether it has nil document body. However, having a nil document body is a valid state for a document, so I added field to determine whether it is a tombstone. I didn't write a schema migration to add this field since we have no released version of SG that can use a persistent rosmar database.

I switched some bitflags to an options struct to make it easier to read and more idiomatic in go, rather than add two new flags.

This passes all tests in Sync Gateway, including the ones that are currently skipped.

@bbrks bbrks self-assigned this Nov 20, 2023
Copy link
Member

@bbrks bbrks left a comment

Choose a reason for hiding this comment

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

Makes sense! LGTM 👍

@bbrks bbrks merged commit 9f20fac into main Nov 21, 2023
12 checks passed
@bbrks bbrks deleted the CBG-3392 branch November 21, 2023 14:17
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.

2 participants