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

Clean up GatewayService #89310

Closed
DaveCTurner opened this issue Aug 12, 2022 · 3 comments · Fixed by #99994
Closed

Clean up GatewayService #89310

DaveCTurner opened this issue Aug 12, 2022 · 3 comments · Fixed by #99994
Assignees
Labels
:Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. >tech debt

Comments

@DaveCTurner
Copy link
Contributor

GatewayService implements logic for delaying state recovery in the cluster until enough data nodes have joined and/or some timeout has occurred. The implementation is pretty old and doesn't make use of much modern infrastructure for doing this kind of thing, making it pretty hard to follow and to improve (see e.g. #86588). We should clean it up and simplify it.

@DaveCTurner DaveCTurner added :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. >tech debt labels Aug 12, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Aug 12, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@ywangd ywangd self-assigned this Sep 27, 2023
@ywangd
Copy link
Member

ywangd commented Sep 27, 2023

The implementation is pretty old and doesn't make use of much modern infrastructure for doing this kind of thing

@DaveCTurner Could you plese share more details or examples about the "much modern infrastructure"? I noticed the code has a comment about submitting cluster state update in batch. But it does not feel like related for this issue. The other thing I know is ClusterStateObserver. Is it related here? Though other than ClusterStateObserver#waitForState, it is not very new code?

@DaveCTurner
Copy link
Contributor Author

Basically I find this class very hard to follow for such a simple feature - if we were to write this functionality today we wouldn't do it like this. I expect we'd use a SubscribableListener for the timeout and one-shot semantics and make things sensitive to the master term rather than having the resetRecoveredFlags() thing.

ywangd added a commit to ywangd/elasticsearch that referenced this issue Sep 28, 2023
This PR refactors GatewayService with the goal to make it easier to add
new features.

Resolves: elastic#89310
elasticsearchmachine pushed a commit that referenced this issue Oct 10, 2023
This PR refactors GatewayService with the goal to make it easier to add
new features.

Resolves: #89310
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. >tech debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants