Skip to content

Make Snapshot Logic Write Metadata after Segments Backport#9327

Merged
mergify[bot] merged 1 commit intomasterfrom
mkleen/metadata_after_segment_2
Nov 14, 2019
Merged

Make Snapshot Logic Write Metadata after Segments Backport#9327
mergify[bot] merged 1 commit intomasterfrom
mkleen/metadata_after_segment_2

Conversation

@mkleen
Copy link
Copy Markdown
Contributor

@mkleen mkleen commented Nov 6, 2019

Summary of the changes / Why this improves CrateDB

Backport of elastic/elasticsearch#45689
Write metadata during snapshot finalization after segment files
to prevent outdated metadata in case of dynamic mapping updates.

Checklist

  • User relevant changes are recorded in CHANGES.txt
  • Touched code is covered by tests
  • Documentation has been updated if necessary
  • CLA is signed
  • This does not contain breaking changes, or if it does:
    • It is released within a major release
    • It is recorded in CHANGES.txt
    • It was marked as deprecated in an earlier release if possible
    • You've thought about the consequences and other components are adapted
      (E.g. AdminUI)

@mkleen mkleen force-pushed the mkleen/metadata_after_segment_2 branch 2 times, most recently from 0f56525 to 8b73dac Compare November 6, 2019 16:23
@mkleen mkleen force-pushed the mkleen/metadata_after_segment_2 branch from 8b73dac to f5881f1 Compare November 7, 2019 16:48
@mkleen mkleen requested a review from mfussenegger November 12, 2019 17:27
Copy link
Copy Markdown
Member

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also refer to the upstream change within the commit message?

Copy link
Copy Markdown
Member

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also follow up on this with some QA tests (in crate-qa) that test snapshot compatibility between versions and also the mixed-cluster snapshot case.

We could re-use the minio server-layer recently introduced.

@mkleen mkleen force-pushed the mkleen/metadata_after_segment_2 branch from 6d23ec3 to aa48a6d Compare November 13, 2019 09:37
@mkleen mkleen marked this pull request as ready for review November 13, 2019 09:38
@mkleen mkleen requested a review from seut November 13, 2019 10:05
Copy link
Copy Markdown
Member

@seut seut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, added just few testing related comments.

@mkleen mkleen requested review from mfussenegger and seut November 13, 2019 13:16
Copy link
Copy Markdown
Member

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this have a release notes entry (fix?) and be backported to 4.0?

@seut
Copy link
Copy Markdown
Member

seut commented Nov 13, 2019

Should this have a release notes entry (fix?) and be backported to 4.0?

Yes please.

@mkleen
Copy link
Copy Markdown
Contributor Author

mkleen commented Nov 13, 2019

Should this have a release notes entry (fix?) and be backported to 4.0?

Yes please.

ok added, maybe have a final look before i merge about the change message.

@mkleen mkleen force-pushed the mkleen/metadata_after_segment_2 branch 3 times, most recently from 902832c to 9ec4cbf Compare November 13, 2019 16:17
@mkleen mkleen requested review from mfussenegger and seut November 13, 2019 16:39
Copy link
Copy Markdown
Member

@seut seut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mkleen
Copy link
Copy Markdown
Contributor Author

mkleen commented Nov 14, 2019

👍

yay

Backport of elastic/elasticsearch#45689
Write metadata during snapshot finalization after segment files
to prevent outdated metadata in case of dynamic mapping updates.
@mkleen mkleen force-pushed the mkleen/metadata_after_segment_2 branch from 2f7c310 to d9bb3e7 Compare November 14, 2019 13:48
@mkleen mkleen added v/4.0 ready-to-merge Let Mergify merge the PR once approved and checks pass labels Nov 14, 2019
@mkleen
Copy link
Copy Markdown
Contributor Author

mkleen commented Nov 14, 2019

retest this please

Running: Test class org.elasticsearch.index.engine.InternalEngineTests

FAILURE: Test testRebuildLocalCheckpointTracker(org.elasticsearch.index.engine.InternalEngineTests)

[2019-11-15T03:04:45,320][INFO ][o.e.i.e.InternalEngineTests] [testRebuildLocalCheckpointTracker] before test

[2019-11-15T03:04:45,436][INFO ][o.e.i.e.InternalEngineTests] [testRebuildLocalCheckpointTracker] after test

REPRODUCE WITH: ./gradlew null -Dtests.seed=18A00E0DB6C5742C -Dtests.class=org.elasticsearch.index.engine.InternalEngineTests -Dtests.method="testRebuildLocalCheckpointTracker" -Dtests.locale=ta-LK -Dtests.timezone=NZ

java.lang.AssertionError: seq_no=54 max_seq_no=62 checkpoint=-1

Expected:

 but: was <false>

@mergify mergify bot merged commit 60e1600 into master Nov 14, 2019
@mergify mergify bot deleted the mkleen/metadata_after_segment_2 branch November 14, 2019 14:38
mkleen added a commit that referenced this pull request Nov 27, 2019
This pull request is a backport of
elastic/elasticsearch#47283

The purpose of this pull request is to speed up the snapshot
finalization. This is archived by parallelizing the writes of the
metadata in the snapshot finalization step. Also, this will
generally speed up the snapshot process overall in case of large
number of indices.

This improvement makes sense, because the snapshot finalization
takes much longer since #9327 is
integrated.
@mkleen mkleen mentioned this pull request Nov 27, 2019
5 tasks
mkleen added a commit that referenced this pull request Nov 27, 2019
This pull request is a backport of
elastic/elasticsearch#47283

The purpose of this pull request is to speed up the snapshot
finalization. This is archived by parallelizing the writes of the
metadata in the snapshot finalization step. Also, this will
generally speed up the snapshot process overall in case of large
number of indices.

This improvement makes sense, because the snapshot finalization
takes much longer since #9327 is integrated.
mkleen added a commit that referenced this pull request Nov 27, 2019
This pull request is a backport of
elastic/elasticsearch#47283

The purpose of this pull request is to speed up the snapshot
finalization. This is archived by parallelizing the writes of the
metadata in the snapshot finalization step. Also, this will
generally speed up the snapshot process overall in case of large
number of indices.

This improvement makes sense, because the snapshot finalization
takes much longer since #9327 is integrated.
mkleen added a commit that referenced this pull request Nov 27, 2019
This pull request is a backport of
elastic/elasticsearch#47283

The purpose of this pull request is to speed up the snapshot
finalization. This is archived by parallelizing the writes of the
metadata in the snapshot finalization step. Also, this will
generally speed up the snapshot process overall in case of large
number of indices.

This improvement makes sense, because the snapshot finalization
takes much longer since #9327 is integrated.
mkleen added a commit that referenced this pull request Nov 27, 2019
This pull request is a backport of
elastic/elasticsearch#47283

The purpose of this pull request is to speed up the snapshot
finalization. This is archived by parallelizing the writes of the
metadata in the snapshot finalization step. Also, this will
generally speed up the snapshot process overall in case of large
number of indices.

This improvement makes sense, because the snapshot finalization
takes much longer since #9327 is integrated.
mkleen added a commit that referenced this pull request Nov 27, 2019
This pull request is a backport of
elastic/elasticsearch#47283

The purpose of this pull request is to speed up the snapshot
finalization. This is archived by parallelizing the writes of the
metadata in the snapshot finalization step. Also, this will
generally speed up the snapshot process overall in case of large
number of indices.

This improvement makes sense, because the snapshot finalization
takes much longer since #9327 is integrated.
mergify bot pushed a commit that referenced this pull request Nov 27, 2019
This pull request is a backport of
elastic/elasticsearch#47283

The purpose of this pull request is to speed up the snapshot
finalization. This is archived by parallelizing the writes of the
metadata in the snapshot finalization step. Also, this will
generally speed up the snapshot process overall in case of large
number of indices.

This improvement makes sense, because the snapshot finalization
takes much longer since #9327 is integrated.
mergify bot pushed a commit that referenced this pull request Nov 27, 2019
This pull request is a backport of
elastic/elasticsearch#47283

The purpose of this pull request is to speed up the snapshot
finalization. This is archived by parallelizing the writes of the
metadata in the snapshot finalization step. Also, this will
generally speed up the snapshot process overall in case of large
number of indices.

This improvement makes sense, because the snapshot finalization
takes much longer since #9327 is integrated.

(cherry picked from commit 3091e26)
mkleen added a commit that referenced this pull request Nov 28, 2019
This pull request is a backport of
elastic/elasticsearch#47283

The purpose of this pull request is to speed up the snapshot
finalization. This is archived by parallelizing the writes of the
metadata in the snapshot finalization step. Also, this will
generally speed up the snapshot process overall in case of large
number of indices.

This improvement makes sense, because the snapshot finalization
takes much longer since #9327 is integrated.

(cherry picked from commit 3091e26)
mergify bot pushed a commit that referenced this pull request Nov 28, 2019
This pull request is a backport of
elastic/elasticsearch#47283

The purpose of this pull request is to speed up the snapshot
finalization. This is archived by parallelizing the writes of the
metadata in the snapshot finalization step. Also, this will
generally speed up the snapshot process overall in case of large
number of indices.

This improvement makes sense, because the snapshot finalization
takes much longer since #9327 is integrated.

(cherry picked from commit 3091e26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Let Mergify merge the PR once approved and checks pass v/4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants