Conversation
This commit introduces StepListener which provides a simple way to write a flow consisting of multiple asynchronous steps without having nested callbacks.
|
Pinging @elastic/es-core-infra |
jaymode
left a comment
There was a problem hiding this comment.
I am not sure what the thread safety is supposed to be but I don’t think it is right based on the implementation. A side note, some of the behavior is pretty similar to ListenableFuture so maybe that can be used/reused here?
server/src/main/java/org/elasticsearch/action/StepListener.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/StepListener.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/StepListener.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/StepListener.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/StepListener.java
Outdated
Show resolved
Hide resolved
|
@jaymode Thanks for looking. I have fixed the concurrency issue. Would you please have another look? Thank you!
Agreed, I'll look into this later. |
s1monw
left a comment
There was a problem hiding this comment.
LGTM I wonder if we can take advantage of this for instance in SyncedFlushService as a followup
Good idea. I will do it. |
This commit introduces StepListener which provides a simple way to write a flow consisting of multiple asynchronous steps without having nested callbacks. Relates #37291
This commit introduces StepListener which provides a simple way to write
a flow consisting of multiple asynchronous steps without having nested
callbacks.
Relates #37291