Skip to content

Revert the default behavior of the internal duplication of a context to avoid the copy of local context data#5606

Merged
vietj merged 1 commit into4.xfrom
revert-context-internal-duplicate-4.x
Jun 13, 2025
Merged

Revert the default behavior of the internal duplication of a context to avoid the copy of local context data#5606
vietj merged 1 commit into4.xfrom
revert-context-internal-duplicate-4.x

Conversation

@vietj
Copy link
Member

@vietj vietj commented Jun 12, 2025

Motivation:

Copying the local data of a duplicated context was introduced to duplicate a context and copy its local data in order to implement specific behavior such as the support of grpc context. This behavior is only necessary in Vert.x 5 and this change has been back-ported to Vert.x 4.x to provide a similar implementation of context locals.

This behavior is unexpected for some users of this API and we should preserve the previous behavior by default.

Changes:

Context duplication does not anymore copy the local data of a context.

…to avoid the copy of local context data.

Motivation:

Copying the local data of a duplicated context was introduced to duplicate a context and copy its local data in order to implement specific behavior such as the support of grpc context. This behavior is only necessary in Vert.x 5 and this change has been back-ported to Vert.x 4.x to provide a similar implementation of context locals.

This behavior is unexpected for some users of this API and we should preserve the previous behavior by default.

Changes:

Context duplication does not anymore copy the local data of a context.
@vietj vietj added the bug label Jun 12, 2025
@vietj vietj self-assigned this Jun 12, 2025
@vietj vietj added this to the 4.5.16 milestone Jun 12, 2025
@vietj vietj merged commit 46ed699 into 4.x Jun 13, 2025
7 checks passed
@vietj vietj deleted the revert-context-internal-duplicate-4.x branch June 13, 2025 07:01
@vietj vietj linked an issue Jun 13, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected local context data behavior change for duplicated context

1 participant