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

Update XattrStore, remove subdocXattrStore #6412

Merged
merged 3 commits into from
Sep 13, 2023
Merged

Conversation

adamcfraser
Copy link
Collaborator

@adamcfraser adamcfraser commented Sep 11, 2023

Remove subdocXattrStore (previously used to support working with multiple gocb versions), moving required functions not already included in XattrStore into XattrStore.

Depends on:
couchbaselabs/rosmar#9
couchbase/sg-bucket#102

Integration Tests

Remove subdocXattrStore (previously used to support working with multiple gocb versions), moving required functions not already included in XattrStore into XattrStore.
torcolvin
torcolvin previously approved these changes Sep 12, 2023
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

_, errCasMismatch := UpdateTombstoneXattr(subdocStore, key, xattrName, 0, uint64(1234), &updatedXattrVal, shouldDeleteBody[i])
_, errCasMismatch := dataStore.WriteWithXattr(key, xattrName, 0, uint64(1234), nil, nil, xattrValBytes, true, shouldDeleteBody[i])

//_, errCasMismatch := UpdateTombstoneXattr(dataStore, key, xattrName, 0, uint64(1234), &updatedXattrVal, shouldDeleteBody[i])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
//_, errCasMismatch := UpdateTombstoneXattr(dataStore, key, xattrName, 0, uint64(1234), &updatedXattrVal, shouldDeleteBody[i])

assert.True(t, IsCasMismatch(errCasMismatch), fmt.Sprintf("Expected cas mismatch for %s", key))

_, errDelete := UpdateTombstoneXattr(subdocStore, key, xattrName, 0, uint64(casValues[i]), &updatedXattrVal, shouldDeleteBody[i])
_, errDelete := dataStore.WriteWithXattr(key, xattrName, 0, uint64(casValues[i]), nil, nil, xattrValBytes, true, shouldDeleteBody[i])
//_, errDelete := UpdateTombstoneXattr(dataStore, key, xattrName, 0, uint64(casValues[i]), &updatedXattrVal, shouldDeleteBody[i])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
//_, errDelete := UpdateTombstoneXattr(dataStore, key, xattrName, 0, uint64(casValues[i]), &updatedXattrVal, shouldDeleteBody[i])

_, errDelete := UpdateTombstoneXattr(subdocStore, key4, xattrName, 0, uint64(0), &updatedXattrVal, false)
_, errDelete := dataStore.WriteWithXattr(key4, xattrName, 0, uint64(0), nil, nil, xattrValBytes, true, false)

//_, errDelete := UpdateTombstoneXattr(dataStore, key4, xattrName, 0, uint64(0), &updatedXattrVal, false)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
//_, errDelete := UpdateTombstoneXattr(dataStore, key4, xattrName, 0, uint64(0), &updatedXattrVal, false)

@torcolvin torcolvin merged commit a76bb57 into master Sep 13, 2023
13 checks passed
@torcolvin torcolvin deleted the remove_subdocXattrStore branch September 13, 2023 00:38
bbrks pushed a commit that referenced this pull request Mar 28, 2024
* Update XattrStore, remove subdocXattrStore

Remove subdocXattrStore (previously used to support working with multiple gocb versions), moving required functions not already included in XattrStore into XattrStore.
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