Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure visibility of finalSinkMetrics #24667

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ public class SpoolingExchangeOutputBuffer
private volatile SpoolingOutputBuffers outputBuffers;
// This field is not final to allow releasing the memory retained by the ExchangeSink instance.
// It is modified (assigned to null) when the OutputBuffer is destroyed (either finished or aborted).
// It doesn't have to be declared as volatile as the nullification of this variable doesn't have to be immediately visible to other threads.
// However since the abort can be triggered at any moment of time this variable has to be accessed in a safe way (avoiding "check-then-use").
private ExchangeSink exchangeSink;
private volatile ExchangeSink exchangeSink;
private Optional<Metrics> finalSinkMetrics;
private final Supplier<LocalMemoryContext> memoryContextSupplier;

Expand Down
Loading