Conversation
…ociated attachment endpoints) using existing `rev` parameter - which can automatically detect RevTreeID/CV. Switch test helpers to use CV in writes when available for coverage, and allow fallback to RevTreeID. Prevent CV OCC value in doc updates for docs in conflict or against non-current versions, since we don't maintain linear version history like we do for RevTrees and can't correlate an old CV with a branched revision ID.
… Rev generation but makes the code simpler
…ter.GetDocVersion for general test coverage.
torcolvin
previously approved these changes
Aug 21, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes CBG-4832, which involves handling legacy revision IDs as delta sources when running in High-Level Vector (HLV) mode. The main purpose is to ensure that when Sync Gateway is running in HLV mode, it can still handle legacy revision IDs (rev tree IDs) properly as delta sources instead of attempting to parse them as HLV versions.
Key changes:
- Adds logic to detect legacy revision IDs and handle them appropriately in HLV mode
- Re-enables a previously disabled test for delta sync push functionality
- Includes certificate files for integration testing
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
rest/blip_api_delta_sync_test.go |
Removes test skip that was blocking delta sync push test due to the bug being fixed |
db/blip_handler.go |
Adds conditional logic to check for legacy rev IDs and fixes error variable reference |
integration-test/certs/* |
Adds SSL certificates and configuration files for secure integration testing |
| deltaSrcVersion, parseErr := ParseVersion(deltaSrcRevID) | ||
| if parseErr != nil { | ||
| return base.HTTPErrorf(http.StatusUnprocessableEntity, "Unable to parse version for delta source for doc %s, error: %v", base.UD(docID), err) | ||
| return base.HTTPErrorf(http.StatusUnprocessableEntity, "Unable to parse version for delta source for doc %s, error: %v", base.UD(docID), parseErr) |
There was a problem hiding this comment.
The error variable reference was corrected from 'err' to 'parseErr', but this fix indicates there was a bug in the original code where the wrong error variable was being used in the error message.
torcolvin
approved these changes
Aug 21, 2025
adamcfraser
approved these changes
Aug 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CBG-4832
Dependencies