Skip to content

Conversation

@brwe
Copy link
Contributor

@brwe brwe commented Mar 4, 2015

If a folder for an index was created that folder is never deleted from that node unless the index is deleted.
Data only nodes therefore can have empty folders for indices that they do not even have shards for.
This commit makes sure empty folders are cleaned up after all shards have moved away from a data only
node. The behavior is unchanged for master eligible nodes.

I changed the testShardActiveElseWhere test to sometimes use data only nodes, not sure if this is useful. Also I added the check for clusterState.metaData().hasIndex(indexName) in IndicesService.deleteIndexStore again. Did not come up with a better way to solve this.

Copy link
Member

Choose a reason for hiding this comment

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

Just wondering why would master nodes want to keep the index directories around?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for the index metadata

@kimchy
Copy link
Member

kimchy commented Mar 5, 2015

LGTM

@brwe brwe closed this in cea8999 Mar 5, 2015
brwe added a commit that referenced this pull request Mar 5, 2015
…ata only node

If a folder for an index was created that folder is never deleted from that node unless the index is deleted.
Data only nodes therefore can have empty folders for indices that they do not even have shards for.
This commit makes sure empty folders are cleaned up after all shards have moved away from a data only
node. The behavior is unchanged for master eligible nodes.

closes #9985
Copy link
Contributor

Choose a reason for hiding this comment

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

in this case isn't the exception wrong? I mean shouldn't we just skip it in that case?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants