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

Improve efficiency of shard store delete checks #120284

Open
fcofdez opened this issue Jan 16, 2025 · 1 comment
Open

Improve efficiency of shard store delete checks #120284

fcofdez opened this issue Jan 16, 2025 · 1 comment
Labels
:Distributed Indexing/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. >enhancement Team:Distributed Indexing Meta label for Distributed Indexing team >tech debt

Comments

@fcofdez
Copy link
Contributor

fcofdez commented Jan 16, 2025

The IndicesStore class acts as a cluster state listener to monitor changes in the routing table and determine if shard data on the local node can be safely deleted. To achieve this, it broadcasts a message to ensure the shard data is no longer needed. However, this approach has a significant drawback: if the routing table frequently changes and nodes take time to respond, the local node may repeatedly send the same ShardActiveRequest.

This behavior becomes particularly problematic in large clusters, especially during node shutdowns, as it leads to unnecessary work and potential inefficiencies. To address this, we should introduce a deduplication mechanism to avoid redundant ShardActiveRequest messages and reduce wasted effort.

@fcofdez fcofdez added :Distributed Indexing/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. >enhancement >tech debt Team:Distributed Indexing Meta label for Distributed Indexing team labels Jan 16, 2025
@DaveCTurner
Copy link
Contributor

DaveCTurner commented Jan 16, 2025

The ShardActiveRequest mechanism was introduced in v1.3, at which point ClusterState updates were very much a best-effort thing and nowhere near reliable enough to use as a source of truth for data deletion decisions. These days it seems unnecessary to me. Rather than adding complexity in this area, we should consider whether to drop the ShardActiveRequest mechanism entirely and trust that the RoutingTable is accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/Store Issues around managing unopened Lucene indices. If it touches Store.java, this is a likely label. >enhancement Team:Distributed Indexing Meta label for Distributed Indexing team >tech debt
Projects
None yet
Development

No branches or pull requests

2 participants