Skip to content
Snippets Groups Projects
Commit daf57da1 authored by Christian Wulf's avatar Christian Wulf
Browse files

fixed concurrency bug in TraceReductionFilter

parent 8acbf443
No related branches found
No related tags found
No related merge requests found
......@@ -60,17 +60,14 @@ public class TraceReductionFilter extends ConsumerStage<TraceEventRecords, Trace
}
private void countSameTraces(final TraceEventRecords traceEventRecords, final long timestamp) {
TraceAggregationBuffer traceBuffer = this.trace2buffer.get(traceEventRecords);
if (traceBuffer == null) {
synchronized (this.trace2buffer) {
traceBuffer = this.trace2buffer.get(traceEventRecords);
if (traceBuffer == null) { // NOCS (DCL)
traceBuffer = new TraceAggregationBuffer(timestamp, traceEventRecords);
this.trace2buffer.put(traceEventRecords, traceBuffer);
}
synchronized (this.trace2buffer) {
TraceAggregationBuffer traceBuffer = this.trace2buffer.get(traceEventRecords);
if (traceBuffer == null) {
traceBuffer = new TraceAggregationBuffer(timestamp, traceEventRecords);
this.trace2buffer.put(traceEventRecords, traceBuffer);
}
traceBuffer.count();
}
traceBuffer.count();
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment