Skip to content

Commit 626e649

Browse files
committed
xds: Make timestamp tracking variables volatile in ExternalProcessorClientInterceptor to fix data race reported by TSAN
1 parent e9a8c2b commit 626e649

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎xds/src/main/java/io/grpc/xds/ExternalProcessorClientInterceptor.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,10 @@ private static class DataPlaneClientCall
297297
private final String backendService;
298298
private volatile Context callContext = Context.ROOT;
299299

300-
private long clientHeadersStartNanos;
301-
private long clientHalfCloseStartNanos;
302-
private long serverHeadersStartNanos;
303-
private long serverTrailersStartNanos;
300+
private volatile long clientHeadersStartNanos;
301+
private volatile long clientHalfCloseStartNanos;
302+
private volatile long serverHeadersStartNanos;
303+
private volatile long serverTrailersStartNanos;
304304

305305
private boolean protocolConfigSent = false;
306306
private ImmutableMap<String, Struct> collectedAttributes;

0 commit comments

Comments
 (0)