Repository navigation
Allow facet time limit to exceed SQL time limit, closes #1780 - #3129
Open
leo7martins wants to merge 3 commits into
Open
leo7martins wants to merge 3 commits into
leo7martins wants to merge 3 commits into
Conversation
atishay-kasliwal
left a comment
There was a problem hiding this comment.
With sql_time_limit_ms=5 and facet_time_limit_ms=30000, a ColumnFacet over a 300k-row query now returns all three buckets (100000 each) in about 0.07 s; master capped it at 5 ms and reported it as timed out. Facet suggestions still use the 5 ms cap, and default-style settings give the same 200 ms limit as before.
Co-authored-by: leo7martins <leo7martins@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3129 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 87 87
Lines 17387 17491 +104
======================================
- Misses 17387 17491 +104 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Closes:
facet_time_limit_msandsql_time_limit_msoverlap? #1780What was wrong
Facet.time_limit_msreturnedcapped_time_limit_ms(facet_time_limit_ms), so the effective limit for requested facets could never exceedsql_time_limit_ms. Thefacet_time_limit_mssetting was therefore silently capped at the main query's time limit, and the remaining gap noted in #1780 (after #3106) stayed in place: a facet that needs more time than the main query always timed out.The fix
Facet.time_limit_msnow returns thefacet_time_limit_mssetting directly, so requested facets can run longer thansql_time_limit_ms.suggest_time_limit_msstill appliescapped_time_limit_ms, now documented indocs/settings.rst.?_timelimit=query string argument is unchanged and still capped for the main query.docs/settings.rst) and changelog entry added.How it was tested
python -m pytest tests/test_facets.py tests/test_api.py -q— 172 passed, 4 skipped, 1 xpassed.python -m pytest -q(full suite) — 3921 passed, 201 skipped, 5 xfailed, 13 xpassed; 7 failed + 6 errors, all pre-existing on this Windows machine and reproduced identically on the unmodified base commit (cp1252 decoding intest_docs.py; timing-sensitiveQueryInterrupted/span tests using single-digit-ms time limits). None are caused by this change.test_facet_time_limit_can_exceed_sql_time_limit(ColumnFacet/ArrayFacet/DateFacet: requested limit uncapped, suggest limit capped),test_requested_facet_can_run_longer_than_sql_time_limit(recursive-CTE facet completes withsql_time_limit_ms=5,facet_time_limit_ms=30000),test_custom_sql_time_limit_cannot_exceed_setting(?_timelimit=still capped).This was written with help from an AI coding assistant. The tests above were run by the assistant, not by a human.