Skip to content

Fix autoCompact intermittent busy error#689

Merged
eerxuan merged 2 commits into
documentdb:mainfrom
danielfrankcom:pr/autoCompact-error
Jul 16, 2026
Merged

Fix autoCompact intermittent busy error#689
eerxuan merged 2 commits into
documentdb:mainfrom
danielfrankcom:pr/autoCompact-error

Conversation

@danielfrankcom

Copy link
Copy Markdown
Collaborator

This change fixes a flaky failure in the autoCompact test suite, which can be triggered by asynchronous background processing.

autoCompact schedules a background task that winds down asynchronously. While it's winding down, any autoCompact call can be transiently rejected as busy.

Previously we attempted to work around this by ensuring an idle state at the start of each run, but it is not possible to reliably detect this without delving into engine internals. To work around this, each command execution has been modified to use the execute_admin_with_retry_command method, which allows the tests to tolerate this background task condition. The outcomes remain the same and will be eventually consistent, we just can't reliably get the engine into a clean starting state due to lack of engine-agnostic observability.

Signed-off-by: Daniel Frankcom <frankcom@amazon.com>
@danielfrankcom danielfrankcom requested a review from a team as a code owner July 15, 2026 19:53
@documentdb-triage-tool documentdb-triage-tool Bot added bug Something isn't working compatibility test Compatibility test related labels Jul 15, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: compatibility test, bug
Project fields suggested: Component test-coverage · Priority P2 · Effort L · Status Needs Review
Confidence: 0.75 (mixed)

Reasoning

component from path globs (test-coverage, test-framework); effort from diff stats (52+38 LOC, 6 files); LLM: Fixes a flaky/intermittent test failure in the autoCompact suite by switching to retry-aware command execution, a small targeted fix within test code.

If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

@danielfrankcom danielfrankcom requested a review from eerxuan July 15, 2026 22:54
@eerxuan eerxuan merged commit 1c78e8e into documentdb:main Jul 16, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compatibility test Compatibility test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants