Skip to content

Commit

Permalink
Add minTranslogGeneration to remote translog metadata filename (opens…
Browse files Browse the repository at this point in the history
…earch-project#15489)

Signed-off-by: Sachin Kale <[email protected]>
Co-authored-by: Sachin Kale <[email protected]>
  • Loading branch information
sachinpkale and Sachin Kale authored Aug 29, 2024
1 parent 3726c52 commit 2b84305
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public String getFileName() {
RemoteStoreUtils.invertLong(generation),
RemoteStoreUtils.invertLong(createdAt),
String.valueOf(Objects.hash(nodeId)),
RemoteStoreUtils.invertLong(minTranslogGeneration),
String.valueOf(CURRENT_VERSION)
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ public void testMetadataConflict() throws InterruptedException {
String mdFilename = tm.getFileName();
long count = mdFilename.chars().filter(ch -> ch == METADATA_SEPARATOR.charAt(0)).count();
// There should not be any `_` in mdFile name as it is used a separator .
assertEquals(10, count);
assertEquals(12, count);
Thread.sleep(1);
TranslogTransferMetadata tm2 = new TranslogTransferMetadata(1, 1, 1, 2, "node--2");
String mdFilename2 = tm2.getFileName();
Expand Down

0 comments on commit 2b84305

Please sign in to comment.