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 before/afterIndexShardDelete callbacks to index lifecycle #10173

Merged
merged 2 commits into from Mar 19, 2015

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Mar 19, 2015

This commit allows code to be executed before or after a shards contentvis deleted from disk. This is only executed if the shard owns the content ie. on a shard file system only a primary shard will execute these operations.

This commit allows code to be executed before or after a shards content
is deleted from disk. This is only executed if the shard owns the
content ie. on a shard file system only a primary shard will execute
these operations.
* @param shardId The shard id
* @param indexSettings the shards index settings
*/
public void afterIndexShardDeleted(ShardId shardId, Settings indexSettings) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you annotate this and the previous indexSettings with @IndexSettings? (I still wish we had separate classes, but it makes it easier to identify in the event this gets renamed to something non-specific).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok sure

@dakrone
Copy link
Member

dakrone commented Mar 19, 2015

LGTM, left one comment.

Also, I think this needs to go into 1.5.0?

@s1monw
Copy link
Contributor Author

s1monw commented Mar 19, 2015

updated... will push soon

@s1monw s1monw merged commit 48388db into elastic:master Mar 19, 2015
@s1monw s1monw deleted the shard_delete_callback branch March 19, 2015 23:18
@clintongormley clintongormley added :Distributed/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. and removed :Distributed/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. labels Mar 20, 2015
@clintongormley clintongormley changed the title [LIFECYCLE] Add before/afterIndexShardDelete callback Add before/afterIndexShardDelete callbacks to index lifecycle Jun 7, 2015
@clintongormley clintongormley added :Core/Infra/Core Core issues without another label and removed :Cluster labels Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants