Repository navigation
Conversation
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit fb74643.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
5bca6b5 to
9229260
Compare
PR Reviewer Guide 🔍(Review updated until commit 43f22eb)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 43f22eb Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 7807e26
Suggestions up to commit aaf168a
Suggestions up to commit a16119c
Suggestions up to commit d96aa19
Suggestions up to commit 4eeff76
|
|
❌ Gradle check result for 9229260: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Persistent review updated to latest commit 5a1ccf8 |
5a1ccf8 to
392d012
Compare
|
Persistent review updated to latest commit 392d012 |
392d012 to
80dd1e3
Compare
|
Persistent review updated to latest commit 80dd1e3 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #22103 +/- ##
============================================
- Coverage 73.40% 73.33% -0.08%
+ Complexity 75872 75856 -16
============================================
Files 6068 6068
Lines 344623 344852 +229
Branches 49584 49622 +38
============================================
- Hits 252978 252899 -79
- Misses 71490 71792 +302
- Partials 20155 20161 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
❌ Gradle check result for e9a1106: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
e9a1106 to
ed1da70
Compare
|
Persistent review updated to latest commit ed1da70 |
|
❌ Gradle check result for ed1da70: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
ed1da70 to
4eeff76
Compare
|
Persistent review updated to latest commit 4eeff76 |
|
❌ Gradle check result for 4eeff76: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
4eeff76 to
d96aa19
Compare
|
Persistent review updated to latest commit d96aa19 |
|
❌ Gradle check result for d96aa19: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
d96aa19 to
a16119c
Compare
|
Persistent review updated to latest commit a16119c |
|
Persistent review updated to latest commit aaf168a |
Tiering prepare now freezes the data-format engine and drains
in-flight merges before the final sync, so no merge mutates the
catalog after the last refresh. The freeze is driven by
INDEX_TIERING_STATE (PREPARING/HOT_TO_WARM) on engine open and via
onSettingsChanged, and explicitly by the prepare action to close the
cluster-state propagation race. While frozen, primary index, refresh,
flush, and merge-commit operations are blocked, with bypasses for the
prepare force-flush and the refresh it drives.
On prepare failure the index is rolled back out of PREPARING (write
block removed and tiering state reset to HOT) so the engine unfreezes
instead of staying stuck and write-blocked. Current-state validation
accepts PREPARING as a valid starting state for hot-to-warm so the
second validation pass during prepare succeeds.
Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com>
Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com>
aaf168a to
7807e26
Compare
|
Persistent review updated to latest commit 7807e26 |
|
❌ Gradle check result for 7807e26: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
…ndingMergeCount with hasPendingMerges Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com>
7807e26 to
43f22eb
Compare
|
Persistent review updated to latest commit 43f22eb |
|
@vishwasgarg18 @mgodwan A test introduced here is very flaky: #22216 Can we get someone to revert/mute/fix this ASAP? |
…earch-project#22103) * Harden hot-to-warm tiering and warm read routing Tiering prepare now freezes the data-format engine and drains in-flight merges before the final sync, so no merge mutates the catalog after the last refresh. The freeze is driven by INDEX_TIERING_STATE (PREPARING/HOT_TO_WARM) on engine open and via onSettingsChanged, and explicitly by the prepare action to close the cluster-state propagation race. While frozen, primary index, refresh, flush, and merge-commit operations are blocked, with bypasses for the prepare force-flush and the refresh it drives. On prepare failure the index is rolled back out of PREPARING (write block removed and tiering state reset to HOT) so the engine unfreezes instead of staying stuck and write-blocked. Current-state validation accepts PREPARING as a valid starting state for hot-to-warm so the second validation pass during prepare succeeds. Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com> * Fix unfreeze test Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com> * refactor(tiering): move merge-state methods to Indexer; replace getPendingMergeCount with hasPendingMerges Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com> --------- Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com>
…earch-project#22103) * Harden hot-to-warm tiering and warm read routing Tiering prepare now freezes the data-format engine and drains in-flight merges before the final sync, so no merge mutates the catalog after the last refresh. The freeze is driven by INDEX_TIERING_STATE (PREPARING/HOT_TO_WARM) on engine open and via onSettingsChanged, and explicitly by the prepare action to close the cluster-state propagation race. While frozen, primary index, refresh, flush, and merge-commit operations are blocked, with bypasses for the prepare force-flush and the refresh it drives. On prepare failure the index is rolled back out of PREPARING (write block removed and tiering state reset to HOT) so the engine unfreezes instead of staying stuck and write-blocked. Current-state validation accepts PREPARING as a valid starting state for hot-to-warm so the second validation pass during prepare succeeds. Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com> * Fix unfreeze test Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com> * refactor(tiering): move merge-state methods to Indexer; replace getPendingMergeCount with hasPendingMerges Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com> --------- Signed-off-by: Vishwas Garg <vishwasgarg14@gmail.com>
Description
This change fixes two issues in the writable-warm (hot-to-warm tiering) path:
1. Non-blocking merge drain — fixes a thread-pool deadlock during tiering prepare
The prepare-tiering step used to block a thread (on the
MANAGEMENTpool) whilewaiting for in-flight merges to drain. Under load this could exhaust the pool and
deadlock, since the merges themselves need threads to complete. This change makes
the prepare path fully non-blocking:
TransportBroadcastByNodeActiongains an opt-in async mode (shardOperationAsync)that dispatches each shard operation to a thread pool and sends the node response
only after all shards complete — no thread is held while waiting.
freeze/onDrainedmodel: the prepareaction freezes the engine (blocking new merges and primary writes), registers a
merge-drain listener, and completes the flush/refresh/remote-sync on the callback.
In-flight merges drain to completion; pending merges are not re-registered while frozen.
cluster.tiering.prepare_timeout(default 90s) boundsthe wait. On timeout the shard fails with a typed
MergeDrainTimeoutExceptioncarryingthe active/pending merge counts, and the coordinator surfaces targeted, actionable
error messages.
mid-migration index remains cancellable after a cluster-manager failover.
2. Per-query object-store registry isolation (DataFusion backend)
Each per-query
RuntimeEnvnow gets its ownDefaultObjectStoreRegistry. Previously,concurrent queries registering different shard stores under the bare
file://schemecould clobber each other, routing one shard's parquet read through another shard's store
and failing with "No such file or directory."
Related Issues
Resolves #[issue number]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.