Skip to content

Conversation

@bbrks
Copy link
Member

@bbrks bbrks commented Aug 21, 2025

bbrks added 13 commits August 20, 2025 14:28
…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.
…ter.GetDocVersion for general test coverage.
torcolvin
torcolvin previously approved these changes Aug 21, 2025
@bbrks bbrks mentioned this pull request Aug 21, 2025
1 task
Base automatically changed from CBG-3778 to main August 21, 2025 21:25
@torcolvin torcolvin dismissed their stale review August 21, 2025 21:25

The base branch was changed.

Copilot AI review requested due to automatic review settings August 21, 2025 22:31
Copy link
Contributor

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

Copilot AI Aug 21, 2025

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.

Copilot uses AI. Check for mistakes.
@torcolvin torcolvin enabled auto-merge (squash) August 21, 2025 22:33
@torcolvin torcolvin merged commit 6c3070b into main Aug 21, 2025
42 of 43 checks passed
@torcolvin torcolvin deleted the CBG-4832 branch August 21, 2025 22:45
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.

4 participants