Skip to content

Conversation

Bencodes
Copy link
Collaborator

The ByteArrayOutputStream isn't being reset between worker instances which causes the output to be repeated as workers finish and return their response. This approach has the unfortunate downside of there being the potential for mangled outputs as multiple work requests are running/finishes at the same time.

A thread safe ByteArrayOutputStream would be in order if we want to preserve the logs from being mangled, but it wouldn't prevent cross contamination of outputs between work requests.

Alternatively if we'd like to perfectly preserve the console logs, we'd need to create a ByteArrayOutputStream per work request that can be written to instead of relying on System#out and System#err.

@Bencodes Bencodes changed the title Fix duplicate worker output Fix duplicate worker console output Jul 21, 2021
@restingbull restingbull merged commit 55867f8 into bazelbuild:master Jul 23, 2021
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