Skip to content
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

Add retry mechanism to get snapshot method #5411

Merged
merged 1 commit into from Mar 13, 2014

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Mar 12, 2014

During snapshot finalization the snapshot file is getting overwritten. If we try to read the snapshot file at this moment we can get back an empty or incomplete snapshot. This change adds a retry mechanism in case of such failure.

// Because we are overriding snapshot during finalization, it's possible that
// we can get an empty or incomplete snapshot for a brief moment
// retrying after some what can resolve the issue
// TODO: switch to atomic update after non-local gateways are removed and we switch to java 1.7
Copy link
Contributor

Choose a reason for hiding this comment

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

argh! yeah I can see why you wanna do this.... I will open an issue for master to remove the gateways rightaway so we can at least move master to atomic update!

@s1monw
Copy link
Contributor

s1monw commented Mar 13, 2014

I think this looks good (yet I think we both don't really like the impl but we have not much of a choice here) I think you should push this to 1.x, 1.0 and master

During snapshot finalization the snapshot file is getting overwritten. If we try to read the snapshot file at this moment we can get back an empty or incomplete snapshot. This change adds a retry mechanism in case of such failure.
@imotov imotov merged commit e029258 into elastic:master Mar 13, 2014
@imotov imotov deleted the failing-test-empty-snapshot branch December 5, 2014 21:08
@clintongormley clintongormley added the :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs label Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v1.0.2 v1.1.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants