ESQL: Fix Driver search load millis as nanos bug#143267
Merged
ivancea merged 5 commits intoelastic:mainfrom Mar 2, 2026
Merged
ESQL: Fix Driver search load millis as nanos bug#143267ivancea merged 5 commits intoelastic:mainfrom
ivancea merged 5 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug introduced in PR #142841 where milliseconds were incorrectly passed as nanoseconds to the reportSearchLoad() method. The bug caused test failures with incorrect search load measurements being off by a factor of 1,000,000.
Changes:
- Fixed
Driver.updateStatus()to pass nanoseconds (vianowSupplier.getAsLong()) instead of milliseconds toreportSearchLoad() - Propagated
nowSupplierparameter through allupdateStatus()andschedule()method calls to ensure consistent use of nanosecond timestamps - Increased test data size in
LuceneSourceOperatorTests.testAccumulateSearchLoad()from (200, 10) to (2000, 100) to ensure reliable assertions with the corrected timing measurements - Unmuted three previously failing tests:
LuceneTopNSourceOperatorTests.testAccumulateSearchLoad,LuceneTopNSourceOperatorScoringTests.testAccumulateSearchLoad, and implicitly fixedLuceneSourceOperatorTests.testAccumulateSearchLoad
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Driver.java | Core bug fix: Added nowSupplier parameter to updateStatus() and propagated it through all calls; uses nowSupplier.getAsLong() for nanoseconds in reportSearchLoad() while keeping System.currentTimeMillis() for status timestamps |
| LuceneSourceOperatorTests.java | Increased test data size from (200, 10) to (2000, 100) to ensure reliable test assertions with accurate timing measurements |
| muted-tests.yml | Unmuted two TopN test variants that were failing due to the timing bug |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../compute/src/test/java/org/elasticsearch/compute/lucene/query/LuceneSourceOperatorTests.java
Show resolved
Hide resolved
idegtiarenko
reviewed
Mar 2, 2026
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator/Driver.java
Outdated
Show resolved
Hide resolved
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Mar 2, 2026
…cations * upstream/main: (60 commits) Use batches for other bulk vector benchmarks (elastic#143167) Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:lookup-join.MvJoinKeyOnTheLookupIndexAfterStats} elastic#143388 Mute org.elasticsearch.snapshots.ConcurrentSnapshotsIT testBackToBackQueuedDeletes elastic#143387 [Inference API] Parse endpoint metadata from persisted endpoints (elastic#143081) Add cluster formation doc to DistributedArchitectureGuide (elastic#143318) Fix flattened root block loader null expectation (elastic#143238) Unmute ValueSourceReaderTypeConversionTests testLoadAll (elastic#143189) ESQL: Add split coalescing for many small files (elastic#143335) Unmute mixed-cluster spatial parse warning test (elastic#143186) Fix zero-size estimate in BytesRefBlock null test (elastic#143258) Make DataType and DataFormat top-level enums (elastic#143312) Add support for steps to change the target index name for later steps (elastic#142955) Set mayContainDuplicates flag to test deduplication (elastic#143375) ESQL: Fix Driver search load millis as nanos bug (elastic#143267) Mute org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test {csv-spec:lookup-join.LookupJoinWithMixPushableAndUnpushableFilters} elastic#143378 ESQL: Forbid MV_EXPAND before full text functions (elastic#143249) ESQL: Fix unresolved name pattern (elastic#143210) Implement boxplot queryDSL aggregation for exponential_histograms (elastic#143026) Add prefetching to x64 bulk vector implementations (elastic#142387) Make large segment vector tests resilient to memory constraints (elastic#143366) ...
tballison
pushed a commit
to tballison/elasticsearch
that referenced
this pull request
Mar 3, 2026
Fixes elastic#143111 Fixes elastic#143086 Fixes elastic#142986 Introduced in elastic#142841 The `now` variable holds millis, while the `reportSearchLoad()` expects nanos. Propagated `nowSupplier` there instead to pass the actual nanos.
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.
Fixes #143111
Fixes #143086
Fixes #142986
Introduced in #142841
The
nowvariable holds millis, while thereportSearchLoad()expects nanos.Propagated
nowSupplierthere instead to pass the actual nanos.