Skip to content

Conversation

@fcofdez
Copy link
Contributor

@fcofdez fcofdez commented Oct 5, 2021

Today MetadataSnapshot#recoveryDiff considers the .liv file as per-commit
rather than per-segment and often transfers them during peer recoveries and
snapshot restores. It also considers differences in .fnm, .dvd and .dvm
files as indicating a difference in the whole segment, even though these files
may be adjusted without changing the segment itself.

This commit adjusts this logic to attach these generational files to the
segments themselves, allowing Elasticsearch only to transfer them if they are
genuinely needed.

Closes #55142
Backport of #77695

Co-authored-by: David Turner [email protected]

Today `MetadataSnapshot#recoveryDiff` considers the `.liv` file as per-commit
rather than per-segment and often transfers them during peer recoveries and
snapshot restores. It also considers differences in `.fnm`, `.dvd` and `.dvm`
files as indicating a difference in the whole segment, even though these files
may be adjusted without changing the segment itself.

This commit adjusts this logic to attach these generational files to the
segments themselves, allowing Elasticsearch only to transfer them if they are
genuinely needed.

Closes elastic#55142
Backport of elastic#77695

Co-authored-by: David Turner <[email protected]>
@fcofdez fcofdez merged commit 97d5a75 into elastic:7.x Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants