driver: only initialize the client once in the docker and remote drivers#2187
Closed
jsternberg wants to merge 1 commit intodocker:masterfrom
Closed
driver: only initialize the client once in the docker and remote drivers#2187jsternberg wants to merge 1 commit intodocker:masterfrom
jsternberg wants to merge 1 commit intodocker:masterfrom
Conversation
The docker and remote drivers both use the client internally and therefore re-initialize the client multiple times within themselves. We do some work to ensure the client is only initialized once through the driver handle, but these drivers end up initializing the client multiple times erroneously. This updates these drivers to have their own caching code for the client to prevent reinitialization which also has the side effect of fixing a bug where traces were duplicated and sent multiple times. Signed-off-by: Jonathan A. Sternberg <[email protected]>
tonistiigi
requested changes
Jan 17, 2024
Member
tonistiigi
left a comment
There was a problem hiding this comment.
CI failures seem to be related. We would need some reference counting and possibly protection for context cancellation.
Collaborator
Author
|
I'm going to try to fix this on the client side, but I suspect that this will probably be easier to fix in two different ways:
Although it might be as simple as just add reference counting to the close call. I guess I'll see after I try that. |
Collaborator
Author
|
Going to close this because I don't think this PR works properly and it's no longer the way that I think this should be done. #2362 is a better solution that should be easier to refactor and maintain. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The docker and remote drivers both use the client internally and
therefore re-initialize the client multiple times within themselves. We
do some work to ensure the client is only initialized once through the
driver handle, but these drivers end up initializing the client multiple
times erroneously.
This updates these drivers to have their own caching code for the client
to prevent reinitialization which also has the side effect of fixing a
bug where traces were duplicated and sent multiple times.