-
Notifications
You must be signed in to change notification settings - Fork 6
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-3703 add options for XDCR #117
Conversation
- putting options for XDCR in sg-bucket allows full XDCR implementation to be in rosmar - place sync metadata constants into sg-bucket for rosmar - merge GetCollectionID()/DataStoreName() into DataStore to avoid extra casting.
- Drop MutationFeedStore2 since the only implementations used by gocb and rosmar are DCP - Merged DataStoreName (ScopeName(),CollectionName()) into DataStore, and add CollectionID to DataStore
package sgbucket | ||
|
||
const ( | ||
SyncDocPrefix = "_sync:" // SyncDocPrefix is a document prefix for all sync metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel like these are a natural fit for sg-bucket, and I don't like splitting the prefix definitions into two places (here, and constants_syncdocs.go). I think I'd prefer to redefine these in rosmar if that's what's needed to avoid circular dependencies.
@@ -0,0 +1,62 @@ | |||
// Copyright 2024-Present Couchbase, Inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be made more obvious that this code isn't XDCR itself, it's an abstraction of XDCR management to support testing. I'd probably name it something like xdcr_manager.go as part of that, rename
"XDCR" to XDCRManager, and have a high-level description of how it's intended to be used at the top of the file, including something about the fact that it's intended to support Couchbase and rosmar implementations.
Stats(context.Context) (*XDCRStats, error) | ||
} | ||
|
||
// XDcrManager represents the presence of "-mobile" flag for Couchbase Server replications. -mobile implies filtering sync metadata, handling version vectors, and filtering sync documents. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// XDcrManager represents the presence of "-mobile" flag for Couchbase Server replications. -mobile implies filtering sync metadata, handling version vectors, and filtering sync documents. | |
// XDCRMobileSetting represents the presence of "-mobile" flag for Couchbase Server replications. -mobile implies filtering sync metadata, handling version vectors, and filtering sync documents. |
Going to implement this in sync gateway. |
This includes #119 which can be merged separately to simplify interfaces.