Fixes for remote store integration#20325
Fixes for remote store integration#20325Bukhtawar merged 1 commit intoopensearch-project:feature/datafusionfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
|
❌ Gradle check result for 3294fec: 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? |
|
|
||
| final class LastRefreshedCheckpointListener implements ReferenceManager.RefreshListener { | ||
| final AtomicLong refreshedCheckpoint; | ||
| volatile AtomicLong pendingCheckpoint; |
There was a problem hiding this comment.
AtomicLong is implicitly volatile in terms of memory visibility
|
|
||
| import java.util.concurrent.atomic.AtomicLong; | ||
|
|
||
| final class LastRefreshedCheckpointListener implements ReferenceManager.RefreshListener { |
There was a problem hiding this comment.
Maybe move this as an inner class for CompositeEngine?
There was a problem hiding this comment.
Kept this outside so that is can shared between InternalEngine and CompositeEngine. Made changes in InternalEngine as well.
| public CatalogSnapshot cloneNoAcquire() { | ||
| // Still using the clone call since Lucene call requires clone. This will allow a SegmentsInfos backed CatalogSnapshot to use the same method in calls. | ||
| return this; | ||
| } |
There was a problem hiding this comment.
Technically this isn't clone right?
There was a problem hiding this comment.
Yes.
We need a clone for SegmentsInfo but it is not required for default CatalogSnaphot. Once we have a SegmentInfos backed CatalogSnapshot for Lucene changes to work with same code, this would make more sense.
Hence, kept it like this for now.
| try { | ||
| catalogSnapshot.close(); | ||
| } catch (Exception ex) { | ||
|
|
||
| } |
There was a problem hiding this comment.
Assuming this is the older version of the snapshot that would be dec referenced?
There was a problem hiding this comment.
This is the latest one, but the RefreshListener relies on fetching the latest catalog snapshot from engine later. I've modified this to be passed a supplier so that it can acquire and release both in the same context.
3294fec to
0c32359
Compare
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
0c32359 to
1854fe5
Compare
|
❌ Gradle check result for 1854fe5: 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? |
283b9f1
into
opensearch-project:feature/datafusion
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
* Changes to get remote upload and replication to work for lucene indices Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Replication changes Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Fixes for remote store integration (#20325) Signed-off-by: Mohit Godwani <mgodwan@amazon.com> * Updated and Refactored the code to have only required changes for recovery * Removed extra logging lines * Resolving PR comments * Updated the VSRManagerTests to use ParquetFileMetadata as flushResult * Fixing RemoteSegmentStoreDirectoryTests and RemoteSegmentStoreDirectoryWithPinnedTimestampTests * Fix for merged files not getting uploaded/deleted Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Added support for SSE KMS testing via run.gradle Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * [RemoteStore] Add support for repository with server side encryption enabled to avoid client side encryption (#19630) Signed-off-by: Pranit Kumar <pranikum@amazon.com> * Adding support for SSE KMS in RemoteSegmentStoreDirectoryFactory Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Fixing lucene remote recovery and files should not get written in replicas * Removing extra logging statements * Revert "Fixing lucene remote recovery and files should not get written in replicas" This reverts commit 1f3aa80. * Using NIOFSDirectory in GenericStoreDirectory Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Adding NRTReplicationCompositeEngine for checkpoint tracking during recovery Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Using index input for checksum calculation instead of input stream Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Fixing lucene remote recovery and files should not get written in replicas * Fixed RemoteIndexRecoveryIT::testRerouteRecovery * Removed the isReadonly check from compositeEngine as we have the NRTEngine now * Removing override for getHistoryUUID in NRTReplicationCompositeEngine Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Updated the IndexFileDeleterTests to use absolute file path * Refactoring syncSegmentsFromGivenRemoteSegmentStore and syncSegmentsFromRemoteSegmentStore APIs * Made deleteUnrefrencedFiles api more generic * Modifying UUID to be added before file name extension for catalog support on parquet files Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> --------- Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> Signed-off-by: Mohit Godwani <mgodwan@amazon.com> Signed-off-by: Pranit Kumar <pranikum@amazon.com> Co-authored-by: Mohit Godwani <81609427+mgodwan@users.noreply.github.com> Co-authored-by: Kamal Nayan <askkamal@amazon.com> Co-authored-by: pranikum <kpranit81@gmail.com>
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
* Changes to get remote upload and replication to work for lucene indices Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Replication changes Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Fixes for remote store integration (opensearch-project#20325) Signed-off-by: Mohit Godwani <mgodwan@amazon.com> * Updated and Refactored the code to have only required changes for recovery * Removed extra logging lines * Resolving PR comments * Updated the VSRManagerTests to use ParquetFileMetadata as flushResult * Fixing RemoteSegmentStoreDirectoryTests and RemoteSegmentStoreDirectoryWithPinnedTimestampTests * Fix for merged files not getting uploaded/deleted Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Added support for SSE KMS testing via run.gradle Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * [RemoteStore] Add support for repository with server side encryption enabled to avoid client side encryption (opensearch-project#19630) Signed-off-by: Pranit Kumar <pranikum@amazon.com> * Adding support for SSE KMS in RemoteSegmentStoreDirectoryFactory Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Fixing lucene remote recovery and files should not get written in replicas * Removing extra logging statements * Revert "Fixing lucene remote recovery and files should not get written in replicas" This reverts commit 1f3aa80. * Using NIOFSDirectory in GenericStoreDirectory Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Adding NRTReplicationCompositeEngine for checkpoint tracking during recovery Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Using index input for checksum calculation instead of input stream Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Fixing lucene remote recovery and files should not get written in replicas * Fixed RemoteIndexRecoveryIT::testRerouteRecovery * Removed the isReadonly check from compositeEngine as we have the NRTEngine now * Removing override for getHistoryUUID in NRTReplicationCompositeEngine Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> * Updated the IndexFileDeleterTests to use absolute file path * Refactoring syncSegmentsFromGivenRemoteSegmentStore and syncSegmentsFromRemoteSegmentStore APIs * Made deleteUnrefrencedFiles api more generic * Modifying UUID to be added before file name extension for catalog support on parquet files Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> --------- Signed-off-by: Raghuvansh Raj <raghraaj@amazon.com> Signed-off-by: Mohit Godwani <mgodwan@amazon.com> Signed-off-by: Pranit Kumar <pranikum@amazon.com> Co-authored-by: Mohit Godwani <81609427+mgodwan@users.noreply.github.com> Co-authored-by: Kamal Nayan <askkamal@amazon.com> Co-authored-by: pranikum <kpranit81@gmail.com>
Fixes in upload flow
Pending: Tests