-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce TranslogFactory for Local/Remote Translog support #4172
Conversation
Signed-off-by: Bukhtawar Khan <[email protected]>
Signed-off-by: Bukhtawar Khan <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Bukhtawar Khan <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #4172 +/- ##
============================================
+ Coverage 70.59% 70.63% +0.03%
+ Complexity 57083 57081 -2
============================================
Files 4603 4604 +1
Lines 274551 274561 +10
Branches 40210 40211 +1
============================================
+ Hits 193831 193933 +102
+ Misses 64514 64394 -120
- Partials 16206 16234 +28
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Please add description, issue link and update the checklist. |
@@ -547,6 +548,8 @@ public synchronized IndexShard createShard( | |||
() -> globalCheckpointSyncer.accept(shardId), | |||
retentionLeaseSyncer, | |||
circuitBreakerService, | |||
// TODO Replace with remote translog factory in the follow up PR | |||
this.indexSettings.isRemoteTranslogStoreEnabled() ? null : new InternalTranslogFactory(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also need to check if the node is primary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally the engine should take care of using the write flavor of TranslogManager. Will ensure we add the right assertions once RemoteFactory changes are made. There is a PR in flight #4127 which will take care of primary and replica
@@ -253,7 +257,8 @@ public EngineConfig( | |||
retentionLeasesSupplier, | |||
primaryTermSupplier, | |||
tombstoneDocSupplier, | |||
false | |||
false, | |||
new InternalTranslogFactory() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need similar check that is added for IndexService here as well?
this.indexSettings.isRemoteTranslogStoreEnabled() ? null : new InternalTranslogFactory()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the default constructor for EngineConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This looks good. There is one thing which will probably play a crucial role in defining the lower level semantics - We have TranslogManager, & TranslogFactory. Basis my understanding, TranslogFactory would provide us different abstraction for storage (local/remote) and TranslogManager helps us define integration of the Engine with the underlying Translog provided by TranslogFactory. This makes it look that TranslogFactory and TranslogManager implementation might be hardwired, is it fairly right understanding? I think this is a good extensibility point - but may be in future we might want to converge to single TranslogManagerCumFactory that helps us with both the needs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ch-project#4172) * Introduce TranslogFactory for Local/Remote Translog support Signed-off-by: Bukhtawar Khan <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-4172-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 551f7c3481040a3b4b051a27eec973c90fb5def6
# Push it to GitHub
git push --set-upstream origin backport/backport-4172-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x Then, create a pull request where the |
…ch-project#4172) * Introduce TranslogFactory for Local/Remote Translog support Signed-off-by: Bukhtawar Khan <[email protected]>
…hanges (#5757) * Introduce TranslogFactory for Local/Remote Translog support (#4172) * Introduce TranslogFactory for Local/Remote Translog support Signed-off-by: Bukhtawar Khan <[email protected]> * [Remote Translog] Introduce remote translog with upload functionality (#5392) * Introduce remote translog with upload functionality Signed-off-by: Gaurav Bafna <[email protected]> Co-authored-by: Bukhtawar Khan <[email protected]> * Enable creation of indices using Remote Translog (#5638) * Enable creation of indices using Remote Translog behind a setting and feature flag Signed-off-by: Gaurav Bafna <[email protected]> * [Remote Translog] Add support for downloading files from remote translog (#5649) * Add support to download translog from remote store during recovery Signed-off-by: Sachin Kale <[email protected]> * Integrate remote translog download on failover (#5699) * Integrate remote translog download on failover Signed-off-by: Ashish Singh <[email protected]> Signed-off-by: Bukhtawar Khan <[email protected]> Signed-off-by: Gaurav Bafna <[email protected]> Signed-off-by: Sachin Kale <[email protected]> Signed-off-by: Ashish Singh <[email protected]>
…hanges (opensearch-project#5757) * Introduce TranslogFactory for Local/Remote Translog support (opensearch-project#4172) * Introduce TranslogFactory for Local/Remote Translog support Signed-off-by: Bukhtawar Khan <[email protected]> * [Remote Translog] Introduce remote translog with upload functionality (opensearch-project#5392) * Introduce remote translog with upload functionality Signed-off-by: Gaurav Bafna <[email protected]> Co-authored-by: Bukhtawar Khan <[email protected]> * Enable creation of indices using Remote Translog (opensearch-project#5638) * Enable creation of indices using Remote Translog behind a setting and feature flag Signed-off-by: Gaurav Bafna <[email protected]> * [Remote Translog] Add support for downloading files from remote translog (opensearch-project#5649) * Add support to download translog from remote store during recovery Signed-off-by: Sachin Kale <[email protected]> * Integrate remote translog download on failover (opensearch-project#5699) * Integrate remote translog download on failover Signed-off-by: Ashish Singh <[email protected]> Signed-off-by: Bukhtawar Khan <[email protected]> Signed-off-by: Gaurav Bafna <[email protected]> Signed-off-by: Sachin Kale <[email protected]> Signed-off-by: Ashish Singh <[email protected]>
* Introduce TranslogFactory for Local/Remote Translog support (#4172) * Introduce TranslogFactory for Local/Remote Translog support Signed-off-by: Bukhtawar Khan <[email protected]> * [Remote Translog] Introduce remote translog with upload functionality (#5392) * Introduce remote translog with upload functionality Signed-off-by: Gaurav Bafna <[email protected]> Co-authored-by: Bukhtawar Khan <[email protected]> * Enable creation of indices using Remote Translog (#5638) * Enable creation of indices using Remote Translog behind a setting and feature flag Signed-off-by: Gaurav Bafna <[email protected]> * [Remote Translog] Add support for downloading files from remote translog (#5649) * Add support to download translog from remote store during recovery Signed-off-by: Sachin Kale <[email protected]> * Integrate remote translog download on failover (#5699) * Integrate remote translog download on failover Signed-off-by: Ashish Singh <[email protected]> Signed-off-by: Bukhtawar Khan <[email protected]> Signed-off-by: Gaurav Bafna <[email protected]> Signed-off-by: Sachin Kale <[email protected]> Signed-off-by: Ashish Singh <[email protected]> Signed-off-by: Bukhtawar Khan <[email protected]> Signed-off-by: Gaurav Bafna <[email protected]> Signed-off-by: Sachin Kale <[email protected]> Signed-off-by: Ashish Singh <[email protected]> Co-authored-by: Gaurav Bafna <[email protected]>
…hanges (#5757) * Introduce TranslogFactory for Local/Remote Translog support (#4172) * Introduce TranslogFactory for Local/Remote Translog support Signed-off-by: Bukhtawar Khan <[email protected]> * [Remote Translog] Introduce remote translog with upload functionality (#5392) * Introduce remote translog with upload functionality Signed-off-by: Gaurav Bafna <[email protected]> Co-authored-by: Bukhtawar Khan <[email protected]> * Enable creation of indices using Remote Translog (#5638) * Enable creation of indices using Remote Translog behind a setting and feature flag Signed-off-by: Gaurav Bafna <[email protected]> * [Remote Translog] Add support for downloading files from remote translog (#5649) * Add support to download translog from remote store during recovery Signed-off-by: Sachin Kale <[email protected]> * Integrate remote translog download on failover (#5699) * Integrate remote translog download on failover Signed-off-by: Ashish Singh <[email protected]> Signed-off-by: Bukhtawar Khan <[email protected]> Signed-off-by: Gaurav Bafna <[email protected]> Signed-off-by: Sachin Kale <[email protected]> Signed-off-by: Ashish Singh <[email protected]>
Signed-off-by: Bukhtawar Khan [email protected]
Description
The PR tries to introduce a Translog factory for supporting remote file-system backed txlog. The remote file-system backed translog will still use operations committed on local on-disk txlog and will upload the same to the remote blob store container.
Issues Resolved
[List any issues this PR will resolve]
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.