You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Vert.x core instrumentation modifies the FutureImpl class to store a Token whenever a Listener is added. The token is stored in a Map, keyed by the Listener.
This does not work well when there is a singleton Listener, or when a Listener is reused multiple times.
First, the Token reference get lost when a Listener is added to a second FutureImpl. This causes the transaction to be open until the missing Token times out.
Second, since the Token is retrieved using the Listener, it may link to the wrong FutureImpl. For instance, a Listener is added to two FutureImpls in two different transactions. The Token stored in the map will reference the second transaction, but if the first FutureImpl executes first, it will be linked to the second transaction, instead of the first. And the second transaction will not link to a FutureImpl at all.
Acceptance Criteria
FutureImpls are linked properly to the originating transaction and no Token references are lost.
Description
The Vert.x core instrumentation modifies the FutureImpl class to store a Token whenever a Listener is added. The token is stored in a Map, keyed by the Listener.
This does not work well when there is a singleton Listener, or when a Listener is reused multiple times.
First, the Token reference get lost when a Listener is added to a second FutureImpl. This causes the transaction to be open until the missing Token times out.
Second, since the Token is retrieved using the Listener, it may link to the wrong FutureImpl. For instance, a Listener is added to two FutureImpls in two different transactions. The Token stored in the map will reference the second transaction, but if the first FutureImpl executes first, it will be linked to the second transaction, instead of the first. And the second transaction will not link to a FutureImpl at all.
Acceptance Criteria
FutureImpls are linked properly to the originating transaction and no Token references are lost.
Additional context
NR-334557
The text was updated successfully, but these errors were encountered: