Fix bug in BESStubbyClient where stream message send failures resulted in the client being in an inconsistent state: The client-visible Future was marked done, but the internal stream state was not reset. Instead, canonicalize on a single codepath that updates this state transition by manually aborting the stream in such cases.
Fix another bug where the streamStatus state update could race with another call from the client.
RELNOTES: None
PiperOrigin-RevId: 226516562
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceTransport.java b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceTransport.java
index 605beea..cec9431 100644
--- a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceTransport.java
+++ b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceTransport.java
@@ -562,9 +562,7 @@
}
long sleepMillis = retrySleepMillis(retryAttempt);
- logInfo(
- "Retrying publishLifecycleEvent: status='%s', sleepMillis=%d",
- streamStatus, sleepMillis);
+ logInfo("Retrying stream: status='%s', sleepMillis=%d", streamStatus, sleepMillis);
sleeper.sleepMillis(sleepMillis);
// If we made progress, meaning the server ACKed events that we sent, then reset