Repository navigation
Raise execute_command_until default timeout to 20 seconds - #737
Merged
Merged
Conversation
Some engines publish $indexStats usage counters on a roughly 10-second cycle, so a counter read right after a query can stay at 0 for about 10 seconds. With a 10-second poll the counter often arrived on the last read, and under parallel load it sometimes missed it. A 20-second default gives twice that cycle. Polling still stops as soon as the predicate accepts a result, so the timeout only costs time when the state never appears. Signed-off-by: Samar Farooqi <samafarc@amazon.com>
15 seconds leaves about 5 seconds over the ~10-second counter cycle; the slowest counter read measured was 10.7 s. Signed-off-by: Samar Farooqi <samafarc@amazon.com>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (docs, test-framework); effort from diff stats (8+2 LOC, 2 files) If a label is wrong, ping |
This reverts commit 5a0af39. 20 seconds gives twice the ~10-second counter cycle, and it is the limit the validation runs used. Signed-off-by: Samar Farooqi <samafarc@amazon.com>
eerxuan
approved these changes
Nov 18, 2026
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
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.
Summary
execute_command_until(added in #736) polls for state some engines publishasynchronously. Its default timeout is 10 seconds. On an engine that
publishes
$indexStatsusage counters on a roughly 10-second cycle, thecounter often appears only on the last read before that deadline, and under
parallel load it sometimes misses it, so the test fails by timing.
This PR raises the default to 20 seconds, twice that cycle. Nothing else
changes: polling still stops as soon as the predicate accepts a result,
errors are still returned at once, and on an engine that reports the state
immediately the command still runs exactly once. The timeout only costs
time when the state never appears.
docs/testing/TEST_FORMAT.mdnow statesthe default.
Testing
pytest documentdb_tests/framework: 59 passed, includingtest_executor_polling.py.$indexStatscounter tests intest_hidden_behavior.pyandtest_indexStats_ops_counter.py, together with the other tests in thefiles Route remaining test-side failures through the assertion #736 changed (94 tests), were run 18 times each on an x86_64 and an
arm64 engine whose counters lag (15 runs with 8 workers, 2 with 6, 1
serial). All passed. The slowest counter read took 10.5 s on x86_64 and
10.7 s on arm64; 7 reads took longer than 10 s and would have failed with
the old default.