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

Allow custom metadata to specify whether or not it should be in a snapshot #7901

Merged
merged 1 commit into from Sep 30, 2014

Conversation

Projects
None yet
5 participants
@imotov
Member

imotov commented Sep 26, 2014

Before this change all persistent custom metadata is stored as part of snapshot. It requires us to remove repositories metadata later during recovery process. This change allows custom metadata to specify whether or not it should be stored as part of a snapshot.

Fixes #7900

@areek

This comment has been minimized.

Contributor

areek commented Sep 26, 2014

+1 to this feature, LGTM; tests looks good, not really familiar with Snapshot/Restore code though.

@@ -1301,7 +1310,7 @@ public static void toXContent(MetaData metaData, XContentBuilder builder, ToXCon
for (ObjectObjectCursor<String, Custom> cursor : metaData.customs()) {
Custom.Factory factory = lookupFactorySafe(cursor.key);
if (!persistentOnly || factory.isPersistent()) {
if ((!persistentOnly || factory.isPersistent()) && (!snapshotOnly || factory.isSnapshottable())) {

This comment has been minimized.

@s1monw

s1monw Sep 29, 2014

Contributor

can we maybe use persistenOnly == false

@@ -199,6 +199,10 @@ public boolean isPersistent() {
return true;
}
@Override

This comment has been minimized.

@s1monw

s1monw Sep 29, 2014

Contributor

it seems like MetaData.Custom should be and abstract class

@s1monw

This comment has been minimized.

Contributor

s1monw commented Sep 29, 2014

left some comments

@s1monw s1monw removed the review label Sep 29, 2014

@imotov

This comment has been minimized.

Member

imotov commented Sep 29, 2014

@s1monw @kimchy Thanks for the review. I pushed an update.

@kimchy

This comment has been minimized.

Member

kimchy commented Sep 29, 2014

LGTM

@s1monw s1monw added v1.4.0 and removed v1.4.0.Beta1 labels Sep 30, 2014

@s1monw

This comment has been minimized.

Contributor

s1monw commented Sep 30, 2014

LGTM I think this can go in to 1.4.0Beta1

@s1monw s1monw added v1.4.0.Beta1 and removed v1.4.0 labels Sep 30, 2014

Snapshot/Restore: Allow custom metadata to specify whether or not it …
…should be in a snapshot

Before this change all persistent custom metadata is stored as part of snapshot. It requires us to remove repositories metadata later during recovery process. This change allows custom metadata to specify whether or not it should be stored as part of a snapshot.

  Fixes #7900

@imotov imotov merged commit b7a4c6d into elastic:master Sep 30, 2014

@clintongormley clintongormley changed the title from Snapshot/Restore: Allow custom metadata to specify whether or not it sho... to Allow custom metadata to specify whether or not it should be in a snapshot Jun 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment