Skip to content

Conversation

@symious
Copy link
Contributor

@symious symious commented Oct 1, 2025

What changes were proposed in this pull request?

Currently the query work is done by the ELG worker threads, need to separate the works so that workers can focus on their job.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/RATIS-2340

How was this patch tested?

Stack dump shows not using ELG worker threads.

return replyFuture
.thenCompose(readIndex -> getReadRequests().waitToAdvance(readIndex))
.thenCompose(readIndex -> queryStateMachine(request))
.thenComposeAsync(ignored -> stateMachine.query(request.getMessage()), readAsyncExecutor)
Copy link
Contributor

Choose a reason for hiding this comment

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

@symious , Since it is calling stateMachine.query(..), the StateMachine implementation could choose to run it with its own executor. If we use an executor here, then the stateMachine has no choice and is forced to run it with Ratis executor. So I suggest not to make this change.

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.

2 participants