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-3869: Fix losing user xattr on import feed for docs with no sync data #6755

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

gregns1
Copy link
Contributor

@gregns1 gregns1 commented Apr 4, 2024

CBG-3869

  • Hooked rawUserXattr to the output of parseXattrStreamData
  • Changed the rawXattr return to be nil (in event of no sync data) and moved the rawUserXattr to the correct return value
  • Testing for functionality of importing a doc with user xattr defined with no sync data on it through the import feed. In addition have part of the test that writes a doc with array of channels to test that functionality of that.
  • Assert that the above docs are assigned the channels correctly

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

Integration Tests

@gregns1 gregns1 self-assigned this Apr 4, 2024
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, some tiny test improvements for future debugging.

It'd be cool to have this tested outside RestTester as a unit test on this function. I'm working on a test function to construct a raw body for UnmarshalDocumentSyncDataFromFeed in CBG-3835

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, some tiny test improvements for future debugging.

It'd be cool to have this tested outside RestTester as a unit test on this function. I'm working on a test function to construct a raw body for UnmarshalDocumentSyncDataFromFeed in CBG-3835

@gregns1 gregns1 assigned torcolvin and unassigned gregns1 Apr 8, 2024
@gregns1 gregns1 merged commit fdca566 into main Apr 9, 2024
30 checks passed
@gregns1 gregns1 deleted the CBG-3869 branch April 9, 2024 14:20
bbrks pushed a commit that referenced this pull request Apr 29, 2024
…ocs with no sync data (#6755)

* CBG-3869: Fix losing user xattr on import feed for docs with no sync data

* update to new api spec

* updates off review
torcolvin pushed a commit that referenced this pull request May 1, 2024
…ocs with no sync data (#6796)

Co-authored-by: Gregory Newman-Smith <109068393+gregns1@users.noreply.github.com>
Fix losing user xattr on import feed for docs with no sync data (#6755)
fix for panic in TestUnmarshalDocFromImportFeed on anemone branch (#6781)

Backports #6755 and #6781 to 3.1.6
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