-
Notifications
You must be signed in to change notification settings - Fork 140
CBG-4832: Handle legacy rev IDs as deltaSrc even when running in HLV mode #7698
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
…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.
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 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) |
Copilot
AI
Aug 21, 2025
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.
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.
CBG-4832
Dependencies