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

Schedule pending delete if index store delete fails #9856

Merged
merged 1 commit into from Feb 25, 2015

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Feb 24, 2015

We try to lock all shards when an index is deleted but likely not
succeeding since shards are still active. To ensure that shards
that used to be allocated on that node get cleaned up as well we have
to retry or block on the delete until we get the locks. This is not desirable
since the delete happens on the cluster state processing thread. Instead of blocking
this commit schedules a pending delete for the index just like if we can't delete shards.

@s1monw
Copy link
Contributor Author

s1monw commented Feb 25, 2015

@bleskes if you have a minute can you look at this?

numPending++;
indicesService.addPendingDelete(test.index(), new ShardId(test.index(), 0), test.getIndexSettings());
}
indicesService.addPendingDelete(test.index(), test.getIndexSettings());
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's a pain code wise, but can we sometime put the index delete first in the queue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can sort it for sure

@bleskes
Copy link
Contributor

bleskes commented Feb 25, 2015

LGTM. Left two minor comments.

@bleskes
Copy link
Contributor

bleskes commented Feb 25, 2015

LGTM, again :)

@s1monw s1monw force-pushed the pending_index_delete branch 2 times, most recently from d98ded5 to 6c38840 Compare February 25, 2015 13:22
We try to lock all shards when an index is deleted but likely not
succeeding since shards are still active. To ensure that shards
that used to be allocated on that node get cleaned up as well we have
to retry or block on the delete until we get the locks. This is not desirable
since the delete happens on the cluster state processing thread. Instead of blocking
this commit schedules a pending delete for the index just like if we can't delete shards.
@s1monw s1monw merged commit 306b7b0 into elastic:master Feb 25, 2015
@clintongormley clintongormley added :Distributed/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. and removed review labels Mar 19, 2015
@clintongormley clintongormley changed the title [INDICES] Schedule pending delete if index store delete fails Schedule pending delete if index store delete fails Jun 7, 2015
@clintongormley clintongormley added :Distributed/Engine Anything around managing Lucene and the Translog in an open shard. and removed :Distributed/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Engine Anything around managing Lucene and the Translog in an open shard. >enhancement v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants