-
Notifications
You must be signed in to change notification settings - Fork 140
CBG-4782: new rev tree property for ISGR replications #7671
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
Conversation
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.
Pull Request Overview
This PR introduces a new revision tree property (revTree
) for ISGR (Inter-Sync Gateway Replication) replications to support transportation of revision tree information between Sync Gateway peers. The property is added for future use but not yet processed in the write path.
- Adds new
revTree
message property constant and handling in BLIP sync messages - Implements logic to send/receive revision tree property when communicating between SGW peers using version vectors
- Sets client type on active replicator peers to enable proper ISGR communication
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
db/blip_sync_messages.go | Adds new RevMessageTreeHistory constant for the revTree property |
db/blip_sync_context.go | Implements logic to send revision tree property and adds helper method |
db/blip_handler.go | Adds receiving logic for revision tree property in rev messages |
db/blip.go | Updates blipRevMessageProperties function to include revision tree property |
db/active_replicator.go | Sets client type to SGR2 for active replicator connections |
@@ -1078,6 +1084,9 @@ func (bh *blipHandler) processRev(rq *blip.Message, stats *processRevStats) (err | |||
var incomingHLV *HybridLogicalVector | |||
// Build history/HLV | |||
var legacyRevList []string | |||
// we can probably use legacyRevList instead of this but to avoid hooking this up to write code we will use |
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.
[nitpick] This TODO comment explains implementation details rather than intent. Consider replacing with a comment that explains why a separate list is needed for the rev tree property, or reference the specific ticket (CBG-4790) that will address this.
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
CBG-4782
Pre-review checklist
fmt.Print
,log.Print
, ...)base.UD(docID)
,base.MD(dbName)
)docs/api
Dependencies (if applicable)
Integration Tests
GSI=true,xattrs=true
https://jenkins.sgwdev.com/job/SyncGateway-Integration/3244/