-
Notifications
You must be signed in to change notification settings - Fork 138
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-741 - Pre-2.5 _attachment migration #4528
Conversation
0e3215e
to
59bf30b
Compare
Return hasPre25Attachments bool from revcache for upgrade case fix _attachment in test wip Remove write part of attachment meta (rely on in-memory moving on each read) Remove debug Return error instead of panic Reorder teardown to prevent panics using walrus Improve comments, extra assertions on doc syncData Remove unnecessary changes
…o bodyBytes, add new tests to support mixed pre-2.5 and 2.5 meta
Tweaked the approach based on discussion yesterday, and evaluating usages of getRevision to avoid processing _attachments over and over, and doing it in many places. Black arrows are all calls down into getRevision. |
) * Unit test repro * Update test Return hasPre25Attachments bool from revcache for upgrade case fix _attachment in test wip Remove write part of attachment meta (rely on in-memory moving on each read) Remove debug Return error instead of panic Reorder teardown to prevent panics using walrus Improve comments, extra assertions on doc syncData Remove unnecessary changes * Reuse inject/MergeAttachment functions when injecting attachments into bodyBytes, add new tests to support mixed pre-2.5 and 2.5 meta * Update to centralise attachment handling in getRevision Co-authored-by: Adam Fraser <adam.fraser@couchbase.com>
) (#4535) * Unit test repro * Update test Return hasPre25Attachments bool from revcache for upgrade case fix _attachment in test wip Remove write part of attachment meta (rely on in-memory moving on each read) Remove debug Return error instead of panic Reorder teardown to prevent panics using walrus Improve comments, extra assertions on doc syncData Remove unnecessary changes * Reuse inject/MergeAttachment functions when injecting attachments into bodyBytes, add new tests to support mixed pre-2.5 and 2.5 meta * Update to centralise attachment handling in getRevision Co-authored-by: Adam Fraser <adam.fraser@couchbase.com> Co-authored-by: Adam Fraser <adam.fraser@couchbase.com>
Performs an in-memory migration of pre-2.5 _attachment metadata into syncData on read before storing in revcache. Does not persist this migration back to the bucket.
New Tests:
Integration Tests