Skip to content

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

Merged
merged 4 commits into from
Aug 8, 2025
Merged

CBG-4782: new rev tree property for ISGR replications #7671

merged 4 commits into from
Aug 8, 2025

Conversation

gregns1
Copy link
Contributor

@gregns1 gregns1 commented Aug 7, 2025

CBG-4782

  • PR for the transportation of the new rev tree property for ISGR replications
  • Nothing is done with it yet this is done in future tickets
  • Had to set client type on active peer given this wasn't set before and we need to know if its ISGR to send/receive this property

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

Dependencies (if applicable)

Integration Tests

@gregns1 gregns1 self-assigned this Aug 7, 2025
@Copilot Copilot AI review requested due to automatic review settings August 7, 2025 15:46
Copy link
Contributor

@Copilot Copilot AI left a 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
Copy link
Preview

Copilot AI Aug 7, 2025

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.

gregns1 and others added 2 commits August 7, 2025 17:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gregns1 gregns1 assigned torcolvin and unassigned gregns1 Aug 8, 2025
@gregns1 gregns1 requested a review from torcolvin August 8, 2025 09:38
@bbrks bbrks merged commit 5f25273 into main Aug 8, 2025
44 checks passed
@bbrks bbrks deleted the CBG-4782 branch August 8, 2025 11:23
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