Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

Today ClusterConnectionManager#connectToNode completes its listeners
in the thread context in which the connection completes, which may not
be the correct context if there are multiple concurrent connection
attempts. With this commit we make sure to complete each listener in the
context in which it was passed to the corresponding call to
connectToNode.

Today `ClusterConnectionManager#connectToNode` completes its listeners
in the thread context in which the connection completes, which may not
be the correct context if there are multiple concurrent connection
attempts. With this commit we make sure to complete each listener in the
context in which it was passed to the corresponding call to
`connectToNode`.
@DaveCTurner DaveCTurner added >bug :Distributed Coordination/Network Http and internode communication implementations v8.0.0 v8.1.0 v7.17.1 labels Jan 25, 2022
@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team. label Jan 25, 2022
@elasticmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @DaveCTurner, I've created a changelog YAML for you.

@idegtiarenko
Copy link
Contributor

@elasticmachine please run elasticsearch-ci/rest-compatibility

@DaveCTurner DaveCTurner marked this pull request as ready for review January 26, 2022 14:41
@DaveCTurner
Copy link
Contributor Author

#83170 will fix the failure

@elasticmachine please run elasticsearch-ci/part-1

Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

LGTM

Are we sure about backporting to 7.17 though? I can't think of a bug this would cause?

@DaveCTurner DaveCTurner merged commit 39b3cb8 into elastic:master Jan 26, 2022
@DaveCTurner DaveCTurner deleted the 2022-01-25-ClusterConnectionManager-thread-context branch January 26, 2022 19:22
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.0 Commit could not be cherrypicked due to conflicts
7.17 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 83035

@DaveCTurner
Copy link
Contributor Author

Are we sure about backporting to 7.17 though? I can't think of a bug this would cause?

Yeah it might not be a real bug, at least not right now, but also not a controversial bugfix so worth the backport IMO.

DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Jan 26, 2022
Today `ClusterConnectionManager#connectToNode` completes its listeners
in the thread context in which the connection completes, which may not
be the correct context if there are multiple concurrent connection
attempts. With this commit we make sure to complete each listener in the
context in which it was passed to the corresponding call to
`connectToNode`.

Co-authored-by: ievgen.degtiarenko <[email protected]>
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Jan 26, 2022
Today `ClusterConnectionManager#connectToNode` completes its listeners
in the thread context in which the connection completes, which may not
be the correct context if there are multiple concurrent connection
attempts. With this commit we make sure to complete each listener in the
context in which it was passed to the corresponding call to
`connectToNode`.

Co-authored-by: ievgen.degtiarenko <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request Jan 27, 2022
* Correct context for ClusterConnManager listener (#83035)

Today `ClusterConnectionManager#connectToNode` completes its listeners
in the thread context in which the connection completes, which may not
be the correct context if there are multiple concurrent connection
attempts. With this commit we make sure to complete each listener in the
context in which it was passed to the corresponding call to
`connectToNode`.

Co-authored-by: ievgen.degtiarenko <[email protected]>

* Missing import

* Missed one

Co-authored-by: ievgen.degtiarenko <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request Jan 27, 2022
* Correct context for ClusterConnManager listener (#83035)

Today `ClusterConnectionManager#connectToNode` completes its listeners
in the thread context in which the connection completes, which may not
be the correct context if there are multiple concurrent connection
attempts. With this commit we make sure to complete each listener in the
context in which it was passed to the corresponding call to
`connectToNode`.

Co-authored-by: ievgen.degtiarenko <[email protected]>

* Missing import

* Fix up tests

Co-authored-by: ievgen.degtiarenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Distributed Coordination/Network Http and internode communication implementations Team:Distributed Meta label for distributed team. v7.17.0 v8.0.0 v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants