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-3703 add options for XDCR #117

Closed
wants to merge 4 commits into from
Closed

CBG-3703 add options for XDCR #117

wants to merge 4 commits into from

Conversation

torcolvin
Copy link
Contributor

@torcolvin torcolvin commented Mar 27, 2024

  • putting options for XDCR in sg-bucket allows full XDCR implementation to be in rosmar
  • place sync metadata constants into sg-bucket for rosmar

This includes #119 which can be merged separately to simplify interfaces.

- 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
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// 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.

@adamcfraser adamcfraser assigned torcolvin and unassigned adamcfraser and gregns1 Apr 5, 2024
@torcolvin torcolvin closed this Apr 9, 2024
@torcolvin torcolvin deleted the CBG-3703 branch April 9, 2024 14:10
@torcolvin
Copy link
Contributor Author

Going to implement this in sync gateway.

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