Skip to content

Conversation

@torcolvin
Copy link
Collaborator

CBG-5144 add test for existing DCP checkpoint prefixes

Add a test to make sure any DCP refactoring doesn't break checkpoint names.

Integration Tests

Copilot AI review requested due to automatic review settings January 29, 2026 15:51
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 adds tests to ensure DCP checkpoint prefixes remain stable across refactoring efforts. The tests verify that checkpoint naming conventions for resync and attachment migration operations don't break unexpectedly.

Changes:

  • Added comprehensive test coverage for DCP checkpoint prefix formats across different collection and metadata ID scenarios
  • Updated attachment compaction functions to return checkpoint prefixes for verification
  • Enhanced existing tests to validate checkpoint prefix values

Reviewed changes

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

Show a summary per file
File Description
db/background_mgr_resync_dcp_test.go Added test verifying resync DCP checkpoint prefix format across various collection/groupID combinations
db/background_mgr_attachment_migration_test.go Added test verifying attachment migration DCP checkpoint prefix format and removed obsolete comment
db/background_mgr_attachment_compaction.go Updated to consume additional return value from sweep phase function
db/attachment_compaction_test.go Enhanced tests to capture and validate checkpoint prefixes from compaction phases
db/attachment_compaction.go Modified sweep and cleanup phase functions to return checkpoint prefixes for testing

return purgedAttachmentCount.Value(), dcpClient.GetMetadataKeyPrefix(), err
}

// attachmentCompactCleanupPhase runs a DCP feed to clean up all documents with an attachment compaction xattr. Returns
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra whitespace between 'with' and 'an' - there is a tab character instead of a single space.

Suggested change
// attachmentCompactCleanupPhase runs a DCP feed to clean up all documents with an attachment compaction xattr. Returns
// attachmentCompactCleanupPhase runs a DCP feed to clean up all documents with an attachment compaction xattr. Returns

Copilot uses AI. Check for mistakes.
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