Skip to content
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 @@ -165,7 +165,7 @@ synchronized int process(Event event) {
@SuppressWarnings({"squid:S3077"}) // Suppress volatile for generic type
private volatile StreamObservers appendLogRequestObserver;
// the appendEntries channel of this appender, taken when it creates its first stream; guarded by the write lock
private int appendEntriesIndex = -1;
private volatile int appendEntriesIndex = -1;
private final boolean useSeparateHBChannel;

private final GrpcServerMetrics grpcServerMetrics;
Expand Down Expand Up @@ -427,9 +427,7 @@ void onCompleted() {

@VisibleForTesting
int getAppendEntriesIndex() {
try (AutoCloseableLock readLock = lock.readLock(caller, LOG::trace)) {
return appendEntriesIndex;
}
return appendEntriesIndex;
}

@Override
Expand Down
Loading