Skip to content

Conversation

bbrks
Copy link
Member

@bbrks bbrks commented Sep 25, 2025

CBG-4880

Use versionPruningWindowHrs for HLV Compaction instead of metadata purge interval. Falls back to 30d default - same as if MPI was not available.

Integration Tests

@Copilot Copilot AI review requested due to automatic review settings September 25, 2025 12:00
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 changes the HLV (Hybrid Logical Vector) compaction mechanism to use the XDCR version pruning window (versionPruningWindowHrs) instead of the metadata purge interval for determining when to compact version history.

  • Introduces a new GetVersionPruningWindow function that fetches the XDCR version pruning window from the bucket configuration
  • Updates HLV compaction to use version pruning window instead of metadata purge interval
  • Adds test support for overriding the version pruning window in tests

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
db/database.go Adds GetVersionPruningWindow function and related caching infrastructure
db/crud.go Updates HLV compaction to use version pruning window instead of metadata purge interval
base/bucket.go Adds VersionPruningWindow method to CouchbaseBucketStore interface
base/collection.go Implements VersionPruningWindow method for GocbV2Bucket
base/bucket_gocb_test.go Adds test coverage for the new version pruning window functionality
rest/replicatortest/replicator_conflict_test.go Updates test to use version pruning window override instead of purge interval override

@bbrks bbrks requested a review from torcolvin September 26, 2025 13:21
@bbrks bbrks assigned torcolvin and unassigned bbrks Sep 26, 2025
@torcolvin torcolvin merged commit fefbd63 into main Sep 26, 2025
42 checks passed
@torcolvin torcolvin deleted the CBG-4880 branch September 26, 2025 15:03
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.

2 participants