Skip to content

Conversation

@idelpivnitskiy
Copy link
Member

No description provided.

final boolean handleMultipleRequests) {
final Completable exchange = requestSingle.flatMapCompletable(rawRequest -> {
System.err.println("--- " + Thread.currentThread().getName() + " --- handleRequestAndWriteResponse-beforeClean: " + AsyncContext.context());
AsyncContext.clear();
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we'd get a whole new instances of AsyncContext.context() every loop, just in case the reference leaks outside of a single request chain.

Copy link
Member Author

@idelpivnitskiy idelpivnitskiy Mar 27, 2025

Choose a reason for hiding this comment

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

This will be guaranteed by a new defer applied before repeat. The clear() here is only a safeguard to make sure whatever new copy of the context is here, it should be empty.

@idelpivnitskiy idelpivnitskiy deleted the otel-server-ctx-idel branch April 21, 2025 21:17
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