-
Notifications
You must be signed in to change notification settings - Fork 1
Add tombstone purge tests with 1-hour interval validation #73
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
Open
pimpin
wants to merge
26
commits into
main
Choose a base branch
from
ticket_70596_test_auto_purge_with_1_hour_interval
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Add set_metadata_purge_interval() function to configure Couchbase Server metadata purge interval via the REST API. Features: - Validates that the interval respects CBS minimum of 0.04 days (1 hour) - Displays warning if below minimum but proceeds for testing purposes - Shows configured interval in days and minutes for clarity This helper is needed to test tombstone purge behavior following Couchbase support recommendations (ticket 70596). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add two test examples to validate CBS tombstone purge behavior following Couchbase support recommendations (ticket 70596). Tests: - tombstone_purge_test_short.rs: Quick validation (~10 min) with 5-min interval - tombstone_purge_test.rs: Full test (~65 min) with 1-hour CBS minimum interval Test scenario: 1. Create document in accessible channel and replicate 2. Delete document (creating tombstone) 3. Purge tombstone from Sync Gateway 4. Configure CBS metadata purge interval 5. Wait for purge interval + margin 6. Compact CBS and SGW 7. Verify tombstone no longer exists in CBS 8. Re-create document with same ID 9. Verify it's treated as new (flags=0) not deleted (flags=1) The tests validate whether tombstones can be completely purged from CBS and SGW such that re-creating a document with the same ID is treated as a brand new document. Documentation updated to describe the new examples and test scenarios. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The previous implementation returned 404 when trying to get the revision of a deleted document (tombstone) because deleted documents are not returned by default via the SGW admin API. Changes: - Add ?deleted=true parameter to the API call to include tombstones - Display whether the retrieved document is deleted - Improve error logging with HTTP status codes This fix allows the tombstone purge tests to properly retrieve the tombstone revision for purging from Sync Gateway. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The previous implementation had a malformed URL that concatenated port numbers incorrectly (http://localhost:8091:8093), causing a "builder error" when trying to query CBS. Changes: - Fix URL to use port 8093 directly for Query service - Parse JSON response to clearly show if document exists or was purged - Display tombstone state with formatted output - Better error handling and status reporting This fix enables the tombstone purge tests to verify whether documents have been successfully purged from Couchbase Server after compaction. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Clarify that STEP 3 (purging tombstone from SGW) may fail with 404 when get_doc_rev cannot retrieve the tombstone. This is expected if: - The tombstone only exists in CBS, not in SGW's cache - SGW auto-purged it very quickly This failure is not blocking for the test objective, which is to verify that re-creating a document with the same ID after purge is treated as new (flags=0) rather than as deleted (flags=1). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The previous implementation used META().deleted which does not exist in Couchbase N1QL. Tombstones cannot be queried directly via standard N1QL queries. With enable_shared_bucket_access: true, Sync Gateway stores metadata in extended attributes (XATTRs). The _sync xattr contains the deleted status and other sync metadata. Changes: - Query META().xattrs._sync.deleted instead of non-existent META().deleted - Use USE KEYS syntax for direct document lookup - Parse and display tombstone status clearly (TOMBSTONE vs LIVE document) - Improve output messages to distinguish between purged vs existing docs This fix enables the tests to properly detect tombstones in CBS and verify whether they persist or get purged after compaction. References: - Sync Gateway docs on shared bucket access and tombstones - Couchbase N1QL docs on XATTRs querying 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The previous Docker configuration did not explicitly set the metadata purge interval, relying on CBS default (3 days). This made tombstone purge testing impractical. Changes: - Add configureBucketCompaction() function to set metadata purge interval - Set to 0.04 days (1 hour) - the CBS minimum per documentation - Execute during initial cluster setup after bucket creation - Add explicit logging for this configuration step This configuration is critical for testing tombstone behavior with Sync Gateway, as it controls when tombstones are permanently removed from CBS after deletion. With the default 3-day interval, testing would require waiting days to observe purge behavior. The 1-hour minimum allows practical testing while respecting CBS constraints. References: - Couchbase docs: metadata purge interval minimum is 0.04 days (1 hour) - Thomas's recommendation in ticket 70596 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The Sync Gateway _sync xattr uses `_deleted` (with underscore) not `deleted` as the field name to indicate tombstone status. Changes: - Query `_sync._deleted` instead of `_sync.deleted` - Add WARNING comment that querying _sync directly is unsupported in production - Reference Sync Gateway documentation on shared bucket access This fix enables proper detection of tombstones vs live documents in CBS when using shared bucket access mode. According to Sync Gateway docs, the _sync structure is internal and can change between versions. Direct N1QL queries on _sync should only be used for testing/debugging, not in production applications. References: - https://docs.couchbase.com/sync-gateway/current/shared-bucket-access.html - Sync Gateway GitHub issues discussing _sync structure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add a fast-running test (~30 seconds) to validate tombstone detection in CBS without waiting for purge intervals. Test scenario: 1. Create document → verify LIVE in CBS 2. Delete document → verify TOMBSTONE in CBS 3. Re-create document → verify LIVE in CBS 4. Check replication flags throughout This example is useful for: - Quickly validating _sync xattr query corrections - Debugging tombstone visibility issues - Understanding tombstone lifecycle without long waits - Verifying that re-created documents are treated as new (flags=0) Runtime: ~30 seconds vs 6+ minutes for other tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The _sync xattr does not have a _deleted field at the root level. Based on actual _sync structure analysis, tombstone status is indicated by: Primary indicator: - flags == 1: Document is a tombstone Secondary indicators: - tombstoned_at: Timestamp when document became tombstone (only present for tombstones) - channels.*.del == true: Per-channel deletion marker - history.deleted: Array of deleted revision indices Changes: - Check _sync.flags == 1 to detect tombstones - Also check for tombstoned_at field as confirmation - Display flags value and tombstoned_at in output - Add #[allow(deprecated)] to test examples to suppress warnings for deprecated Database methods This fix enables proper tombstone detection in CBS when using shared bucket access mode. Real _sync structure discovered via N1QL query: - Live document: flags absent or 0, no tombstoned_at - Tombstone: flags == 1, tombstoned_at present, channels.*.del == true 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add #[allow(dead_code)] and #[allow(deprecated)] attributes to suppress compiler warnings for utility functions and deprecated Database methods used in test examples. Changes: - Add #[allow(dead_code)] to utils modules (cbs_admin, constants, sgw_admin) - Add #[allow(deprecated)] to create_doc helper function - Utility functions are used across different test examples, so dead_code warnings in one example are expected This keeps test output clean and focused on actual test results. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add #[allow(deprecated)] to create_doc() and get_doc() helper functions in tombstone purge tests to suppress warnings about deprecated Database methods. These are test utilities that will be updated to use the new collection-based API in a future refactoring, but for now we suppress warnings to keep test output clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The previous implementation used couchbase-cli setting-compaction which
only sets cluster-wide defaults, not per-bucket settings. This resulted
in autoCompactionSettings: false at bucket level.
Changes:
- Use REST API POST to /pools/default/buckets/{bucket} instead of CLI
- Add required parameters:
- autoCompactionDefined=true (enables per-bucket override)
- purgeInterval=0.04 (1 hour minimum)
- parallelDBAndViewCompaction=false (required parameter)
- Add get_metadata_purge_interval() to verify configuration
- Add check_cbs_config example to inspect current settings
- Improve get function to search purgeInterval in multiple locations
Per-bucket configuration overrides cluster-wide defaults and allows
independent purge interval settings for testing.
Verified: purgeInterval now appears at bucket root level and is set
to 0.04 days (1 hour).
References:
- https://docs.couchbase.com/server/current/rest-api/rest-autocompact-per-bucket.html
- Couchbase docs on cluster-wide vs per-bucket auto-compaction
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
The previous implementation used metadataPurgeInterval parameter which does not work for per-bucket configuration. The REST API requires specific parameters to enable and configure per-bucket auto-compaction. Changes: - Use autoCompactionDefined=true to enable per-bucket override - Use purgeInterval instead of metadataPurgeInterval - Add parallelDBAndViewCompaction=false (required by API) - Add verification call to confirm configuration was applied This aligns the Rust function with the corrected bash script in configure-server.sh to ensure consistent bucket configuration. Without these parameters, the bucket retains cluster-wide defaults and per-bucket purge interval is not applied. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add comprehensive test infrastructure to automate environment setup, test execution, and result reporting for Couchbase support ticket #70596. New modules: - git_checker.rs: Validates git status and extracts commit info - docker_manager.rs: Manages Docker lifecycle (down/rebuild/up/health check) - test_reporter.rs: Generates structured test reports with checkpoints Features: - Automatic Docker environment rebuild before each test - Git validation (fails if uncommitted changes) - Structured report generation in test_results/ directory - Captures tombstone state at each checkpoint via _sync xattr - Extracts CBS and SGW logs for analysis - Generates README with executive summary and GitHub links Report structure: - README.md: Test summary with checkpoints and findings - metadata.json: Commit SHA, timestamp, environment info - tombstone_states.json: Full _sync xattr at each step - test_output.log: Complete console output - cbs_logs.log / sgw_logs.log: Container logs Helper improvements: - get_sync_xattr(): Extract _sync xattr without printing - get_metadata_purge_interval(): Enhanced to search multiple locations Dependencies added: - chrono: Timestamp formatting for reports - serde: Serialization for report generation This infrastructure enables reproducible testing with complete documentation for Couchbase support analysis. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Update tombstone_purge_test.rs to use the new automated test infrastructure with Docker management and structured reporting. Changes to tombstone_purge_test.rs: - Add git status validation before test - Automatically rebuild Docker environment with correct config - Integrate TestReporter for structured output - Add checkpoints at each major step with _sync xattr capture - Generate comprehensive report in test_results/ directory - Note: Purge interval no longer set during test (STEP 4) It's now configured at bucket creation via Docker setup New example: - test_with_reporting.rs: Minimal example demonstrating the reporting infrastructure without long waits README updates: - Document automated test infrastructure features - Add check_cbs_config and tombstone_quick_check examples - Explain test report structure and contents - Update tombstone_purge_test description with automation details The test now ensures clean, reproducible runs with complete documentation for Couchbase support analysis. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Rename Database variable from 'db' to 'db_cblite' throughout all test examples to clearly distinguish the local Couchbase Lite database from central (Couchbase Server/Sync Gateway). This improves code readability and prepares for tests that will interact with both local database and central server explicitly. Files updated: - tombstone_purge_test.rs - tombstone_purge_test_short.rs - tombstone_quick_check.rs - test_with_reporting.rs - ticket_70596.rs No functional changes, purely a variable rename for clarity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Implement sync function logic to detect and handle documents that resurrect after their tombstones have expired (BC-994 scenario). Logic: - If document arrives without oldDoc (!oldDoc) AND has updatedAt field - Check if updatedAt is older than 1 hour (test value, production uses 60 days) - If YES: Route to "soft_deleted" channel + set TTL to 5 minutes - This triggers auto-purge in cblite (document removed from accessible channels) - TTL ensures cleanup from central after 5 minutes Test parameters (adapted for rapid testing): - Cutoff: 1 hour (vs 60 days in production) - TTL: 5 minutes (vs 6 months in production) This tests the complete flow: 1. Document older than cutoff resurre cts from cblite 2. Sync function routes to soft_deleted 3. Auto-purge removes from cblite (not in user channels) 4. TTL purges from central after expiry Reference: billeo-engine PR #7672 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add two new helper functions to interact with documents in central (Sync Gateway / Couchbase Server): 1. delete_doc_from_central(doc_id): - Deletes document from central via SGW admin API - Gets current revision, then sends DELETE request - Returns bool indicating success/failure - Used to simulate central-only deletion (doc remains in cblite) 2. check_doc_exists_in_central(doc_id): - Checks if document exists in central via SGW admin API - Returns true if document exists and is LIVE - Returns false if document is deleted, 404, or error - Useful for verifying document state after TTL expiry These functions enable testing the scenario where: - Document is deleted in central only (not in cblite) - Tombstone expires in central - Cblite re-pushes the document (resurrection) - Sync function handles resurrection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Create comprehensive test to validate the complete soft_delete flow when documents resurrect after central tombstone expiry. Test scenario (~75 minutes): 1. Create doc with updatedAt=NOW, replicate to central, STOP replication 2. Delete doc from CENTRAL only (doc remains in cblite) 3. Wait 65 minutes (doc's updatedAt becomes > 1 hour old) 4. Compact CBS + SGW to purge central tombstone 5. Restart replication with RESET CHECKPOINT - Cblite pushes doc1 back to central (resurrection) - Sync function detects updatedAt > 1h cutoff - Routes to "soft_deleted" channel + sets 5-min TTL 6. Verify auto-purge in cblite (doc removed, user has no access to soft_deleted) 7. Wait 6 minutes for TTL expiry 8. Compact CBS + SGW 9. Verify doc purged from central (TTL expired) Features: - Uses automated test infrastructure (Docker management, reporting) - Creates doc with updatedAt field for sync function logic - Tests complete BC-994 flow from resurrection to final purge - Non-blocking checks (logs warnings instead of panics) - Captures full state at each checkpoint This validates the billeo-engine PR #7672 soft_delete logic adapted for testing with 1-hour cutoff and 5-minute TTL. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add comprehensive documentation for the new tombstone_resurrection_test example that validates the BC-994 soft_delete scenario. Documentation includes: - Runtime and features - What it tests (6 key validations) - Complete test scenario (9 steps) - Sync function logic being tested - Report location This test validates the complete flow from document resurrection after tombstone expiry to final purge via TTL, testing the logic from billeo-engine PR #7672 adapted for rapid testing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Ensure tombstone_resurrection_test starts with a clean local database by deleting any existing database from previous runs. This prevents interference from previous test data and ensures reproducible results. Changes: - Check if database exists before opening - Delete existing database if found - Log cleanup action for transparency This is critical for the resurrection test scenario where we need to control exactly when the document is created with its updatedAt timestamp. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Ensure Docker containers (CBS and SGW) use the same timezone as the local environment to prevent time-based logic issues in tests. Changes: - Pass TZ environment variable to both CBS and SGW containers - Add verify_timezone_sync() to check and log timezone configuration - Display local and container timezones during setup - Non-blocking check (warns if mismatch, doesn't fail) This is critical for tests using time-based logic like: - Sync function Date.now() comparisons - updatedAt field age calculations - TTL expiry timing Usage: export TZ="Europe/Paris" # or your local timezone cargo run --features=enterprise --example tombstone_resurrection_test If TZ is not set, defaults to UTC. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Multiple fixes to improve test clarity and fix document resurrection: 1. Fix STEP numbering consistency: - STEP 1-6: Setup and tombstone purge (unchanged) - STEP 7: NEW - Touch document to force push - STEP 8-14: Renumbered for consistency (was 7-13) - Comments now match log output 2. Add document modification before reset checkpoint: - Touch doc1 by adding _resurrection_test field - Forces CBL to detect change and push during reset - Fixes issue where doc wasn't pushed after reset 3. Improve logging and output capture: - Use reporter.log() for all test output - Remove println!() from create_doc helper - Add detailed logging for each verification - Log replication events explicitly after reset 4. Increase wait time after reset: - 10s → 30s to allow replication to complete - Log number of replication events captured - Warn if no events (indicates push didn't happen) These fixes address: - Logs were incomplete (println!() not captured) - STEP numbers didn't match (comments vs logs) - Document wasn't pushed after reset (no change detected) - Hard to diagnose issues without replication event tracking 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…ckpoint Remove STEP 7 (document modification) from the resurrection test to validate the BC-994 scenario as it should occur in production: document resurrection WITHOUT any local modification. Changes: - Removed document touch/modification before reset checkpoint - Renumbered STEP 8-14 to STEP 7-13 for consistency - Updated README to clarify no modification occurs - Document should resurrect naturally when reset checkpoint is used Scenario: - Document exists in cblite (unchanged since creation) - Document was deleted from central, tombstone purged - Reset checkpoint causes cblite to re-evaluate all docs - Document is pushed to central WITHOUT oldDoc - Sync function detects: !oldDoc && updatedAt > 1h → soft_delete This validates whether reset checkpoint alone is sufficient to trigger document resurrection, which is the actual BC-994 scenario. If the document is not pushed without modification, this will reveal a limitation of the reset checkpoint mechanism that needs to be addressed differently. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Remove redundant and non-functional test examples: - tombstone_purge_test_short.rs: Redundant with tombstone_quick_check - tombstone_resurrection_test.rs: Non-functional - reset checkpoint does not re-push unmodified documents - test_with_reporting.rs: Demo only, not a real test Keep essential examples: - ticket_70596.rs: Original auto-purge test - check_cbs_config.rs: Configuration verification utility - tombstone_quick_check.rs: Rapid validation (~30s) - tombstone_purge_test.rs: Complete automated test with reporting All utility infrastructure (utils/) remains unchanged. README updates: - Document key findings from extensive testing - Tombstone purge timing requirements - Reset checkpoint limitation for BC-994 scenario - Simplified examples section Key findings documented: ✅ Tombstone purge works when configured at bucket creation ❌ Retroactive configuration does not purge existing tombstones ❌ Reset checkpoint alone does not re-push unmodified documents 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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.
Context
This PR addresses the tombstone purge issue discussed in Couchbase support ticket #70596.
Final Test Results ✅
After extensive testing, we have successfully validated the tombstone purge behavior with the following confirmed findings:
✅ Tombstone Purge Works Correctly
Test configuration:
Result: Tombstone completely purged from CBS (xattr
_syncabsent)flags=0(treated as new)test_results/test_run_2025-11-01_06-54-46_a427ac3/Conclusion: The metadata purge interval must be configured before tombstones are created. Retroactive configuration does not purge existing tombstones.
❌ Reset Checkpoint Limitation Discovered
Testing revealed that reset checkpoint alone does NOT re-push unmodified documents:
SGW logs evidence:
Type:proposeChanges #Changes: 0after resetImplication for BC-994: Documents must be modified locally before reset checkpoint to trigger re-push.
What's in this PR
1. Automated Test Infrastructure
Complete test automation infrastructure with:
test_results/Each test run produces:
_syncxattr states at each checkpoint2. CBS/SGW Helper Functions
CBS operations (
utils/cbs_admin.rs):get_metadata_purge_interval(): Query current purge interval configurationset_metadata_purge_interval(): Configure via REST API with validationget_sync_xattr(): Extract_syncxattr for tombstone detectioncheck_doc_in_cbs(): Verify document state (live/tombstone/purged)compact_cbs_bucket(): Trigger manual compactionSGW operations (
utils/sgw_admin.rs):add_or_update_user(),get_session(): User managementget_doc_rev(): Get document revision (including deleted)delete_doc_from_central(): Delete document from central onlycheck_doc_exists_in_central(): Verify document existence in SGWpurge_doc_from_sgw(): Purge tombstone from SGWcompact_sgw_database(): Trigger SGW compactionInfrastructure (
utils/):git_checker.rs: Git status validation and commit info extractiondocker_manager.rs: Docker lifecycle managementtest_reporter.rs: Structured report generation3. Test Examples
tombstone_purge_test.rs(~70 minutes)Complete automated test validating tombstone purge after 1-hour interval.
Features:
Run:
cargo run --features=enterprise --example tombstone_purge_testtombstone_quick_check.rs(~30 seconds)Rapid validation of tombstone detection via
_syncxattr queries.Run:
cargo run --features=enterprise --example tombstone_quick_checkcheck_cbs_config.rs(instant)Utility to verify CBS bucket metadata purge interval configuration.
Run:
cargo run --features=enterprise --example check_cbs_configticket_70596.rsAntoine's original test for auto-purge when documents move to inaccessible channels.
Run:
cargo run --features=enterprise --example ticket_705964. Docker Configuration Improvements
Metadata purge interval (
configure-server.sh):autoCompactionDefined=true,purgeInterval,parallelDBAndViewCompactionSync function (
sync-function.js):!oldDoc && updatedAt > 1 hoursoft_deletedchannel + sets TTLTimezone sync (
docker-compose.yml):TZenvironment variable to containersCritical Discoveries
Discovery #1: _sync xattr Structure (flags field)
Tombstone detection requires checking
_sync.flags:Live document:
{ "cas": "...", "channels": { "channel1": null }, "sequence": 7, "value_crc32c": "0x548d82c8" }Tombstone:
{ "flags": 1, // PRIMARY INDICATOR "tombstoned_at": 1761980103, "channels": { "channel1": { "del": true } }, "value_crc32c": "0x00000000" }Purged:
_syncxattr completely absentNB : to get sync meta data, you must query them explicitly (otherwise they are filtered out from meta() :
Discovery #2: Metadata Purge Interval Configuration
CLI method (cluster-wide, insufficient):
Result:
autoCompactionSettings: falseat bucket levelREST API method (per-bucket, correct):
Result:
purgeInterval: 0.04at bucket root levelDiscovery #3: CBS API Validation Bug
The REST API accepts purge interval values below 0.04 days with
200 OKinstead of rejecting them:Recommendation: API should validate like Web UI does.
Discovery #4: Tombstone Purge Timing
Purge interval must be configured before tombstones are created:
tombstoned_at + purge_intervalflags=0regardlessDiscovery #5: Reset Checkpoint Does Not Re-Push Unmodified Documents
Testing BC-994 scenario revealed:
SGW logs evidence:
Implication: For BC-994, documents must be modified locally before reset to trigger push.
Testing
Prerequisites
Set timezone for time-based logic:
Quick Validation
Verify tombstone detection (~30 seconds):
Verify CBS configuration:
Full Test
Complete tombstone purge test with automation (~70 minutes):
What it does automatically:
test_results/Test Report
Report location:
test_results/test_run_<timestamp>_<commit_sha>/Contents:
README.md: Executive summarymetadata.json: Test metadata and GitHub linktombstone_states.json:_syncxattr at each checkpointtest_output.log: Complete console outputcbs_logs.log,sgw_logs.log: Container logsRelated
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]