-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Integrate retention leases to recovery from remote #38829
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
Merged
Merged
Changes from 22 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
82d464d
Integrate retention leases to recovery from remote
jasontedor 6138176
Fix accidental import
jasontedor 9ca7526
Update x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/re…
jasontedor 530b55b
Update x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/re…
jasontedor f6e129e
Force follower to fall behind
jasontedor d294e99
Add more tests
jasontedor 11120d4
Merge branch 'master' into retention-lease-ccr
jasontedor b13c6c5
Make linter happy
jasontedor ab4d61c
Fix lost import
jasontedor 30f1366
Finally
jasontedor e58bbbc
Merge branch 'master' into retention-lease-ccr
jasontedor d5dee9b
Tweak some log messages
jasontedor ae9cff2
wip
jasontedor d027302
Merge remote-tracking branch 'elastic/master' into retention-lease-ccr
jasontedor a42d229
Fix under security
jasontedor 2e6e705
Shift log message
jasontedor cbe044c
More tests
jasontedor 0ac5533
Fix comment
jasontedor 6791827
Fix imports
jasontedor 0dcf6c9
Remove newline
jasontedor b8b2537
Merge remote-tracking branch 'elastic/master' into retention-lease-ccr
jasontedor 1633dfb
Merge branch 'master' into retention-lease-ccr
jasontedor 4005309
Merge branch 'master' into retention-lease-ccr
jasontedor 086e87e
Refactor to helper
jasontedor 69d757c
Enhance logging messages
jasontedor cdf9bdc
Refactor
jasontedor fa7b4df
Merge remote-tracking branch 'elastic/master' into retention-lease-ccr
jasontedor 5bbb07f
Fix imports
jasontedor 6fc440b
Background syncs should be async
jasontedor 30232bb
Remove leftover comment from previous iteration
jasontedor d45d829
Merge branch 'master' into retention-lease-ccr
jasontedor 8fd90fe
Fix imports
jasontedor 21edf1d
Fix mocking tests
jasontedor 7e547ee
Refactor
jasontedor d471872
Update x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/re…
jasontedor fc9a300
Update x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/re…
jasontedor 2c77ad4
Merge remote-tracking branch 'elastic/master' into retention-lease-ccr
jasontedor 6da443a
Tweak logging message
jasontedor 4262372
Merge branch 'master' into retention-lease-ccr
jasontedor dec3d28
Test awaits fix
jasontedor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
38 changes: 38 additions & 0 deletions
38
x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/CcrRetentionLeases.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
package org.elasticsearch.xpack.ccr; | ||
|
||
import java.util.Locale; | ||
|
||
public class CcrRetentionLeases { | ||
|
||
/** | ||
* The retention lease ID used by followers. | ||
* | ||
* @param followerUUID the follower index UUID | ||
* @param leaderUUID the leader index UUID | ||
* @return the retention lease ID | ||
*/ | ||
public static String retentionLeaseId( | ||
final String localClusterName, | ||
final String remoteClusterName, | ||
final String followerIndexName, | ||
final String followerUUID, | ||
final String leaderIndexName, | ||
final String leaderUUID) { | ||
return String.format( | ||
Locale.ROOT, | ||
"%s/%s/%s-following-%s/%s/%s", | ||
jasontedor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
localClusterName, | ||
followerIndexName, | ||
followerUUID, | ||
remoteClusterName, | ||
leaderIndexName, | ||
leaderUUID); | ||
} | ||
|
||
} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.