DataFormat-aware NRT replication engine and remote-store wiring - #21311
Conversation
PR Reviewer Guide 🔍(Review updated until commit 3925bac)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 3925bac Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit f614045
Suggestions up to commit f614045
|
|
❌ Gradle check result for c7f0d9b: 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? |
c7f0d9b to
098c570
Compare
|
Persistent review updated to latest commit 098c570 |
098c570 to
2cfced8
Compare
|
Persistent review updated to latest commit 2cfced8 |
2cfced8 to
8309618
Compare
|
Persistent review updated to latest commit 8309618 |
|
❌ Gradle check result for 8309618: 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? |
8309618 to
b09225c
Compare
|
Persistent review updated to latest commit b09225c |
|
❌ Gradle check result for b09225c: 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? |
|
Persistent review updated to latest commit b09225c |
b09225c to
79a5517
Compare
|
Persistent review updated to latest commit 79a5517 |
79a5517 to
be555e0
Compare
|
Persistent review updated to latest commit be555e0 |
|
❌ Gradle check result for be555e0: 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? |
be555e0 to
12a3eba
Compare
|
Persistent review updated to latest commit 12a3eba |
12a3eba to
4a0b61b
Compare
|
Persistent review updated to latest commit 4a0b61b |
Signed-off-by: Kamal Nayan <askkamal@amazon.com>
Signed-off-by: Kamal Nayan <askkamal@amazon.com>
…comments Signed-off-by: Kamal Nayan <askkamal@amazon.com>
Signed-off-by: Kamal Nayan <askkamal@amazon.com>
Signed-off-by: Kamal Nayan <askkamal@amazon.com>
LuceneCommitter.loadCommittedSnapshots() previously returned null for the initial empty commit (from store.createEmpty()), causing the engine to create a synthetic initial snapshot with lastCommitGeneration = -1. The fallback in getLastCommitGeneration() then used the catalog's in-memory generation counter which advances every refresh. Fix: create an empty DataformatAwareCatalogSnapshot for the initial commit and seed its lastCommitInfo from the on-disk segments_N — same path already used for commits that have a serialized catalog. This ensures getLastCommitGeneration() returns a stable value from the start. Also removes the emptyRecovery special case from DataFormatAwareEngine since listCommittedSnapshots() now always returns a non-empty list. Signed-off-by: Bukhtawar Khan <bukhtawar.khan@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Bukhtawar Khan <bukhtawa@amazon.com>
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
|
Persistent review updated to latest commit 3925bac |
Description
Summary
Wires up remote-store segment replication and peer recovery for DataFormatAware (DFA) indices. Adds
DataFormatAwareNRTReplicationEngineand the upload/replica plumbing needed for a DFA primary and replica to agree on segment state via remote store.Key changes
CatalogSnapshot: polymorphicgetSegmentInfosBytes()so uploader replica handle Lucene and DFA snapshots uniformly.DataFormatAwareEngine: attaches(SegmentInfos bytes, generation)after commit so uploads carry a consistent pair. UnblocksacquireSafeIndexCommitfor peer recovery phase-1.DataFormatAwareNRTReplicationEngine: Full implementation of replica engine for DFA;RemoteStoreReplicationSource,SegmentReplicationTarget,IndexShard.finalizeReplication, andRemoteStoreRefreshListenernow route DFA snapshots end-to-end.Tests
DataFormatAwareUploadIT(5) — parquet files uploaded; metadata round-trip; per-refresh checkpoint advance; format-aware keys; multi-flush guard.DataFormatAwareReplicationIT(3) — single-refresh convergence; catalog-snapshot round-trip; metadata-format agreement.Related Issues
Resolves #[Issue number to be closed when this PR is merged]
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.