Copilot commented on code in PR #3731:
URL: https://github.com/apache/celeborn/pull/3731#discussion_r3457389241


##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/FetchHandler.scala:
##########
@@ -557,6 +557,14 @@ class FetchHandler(
       s" to fetch block $streamChunkSlice")
 
     val streamState = 
chunkStreamManager.getStreamState(streamChunkSlice.streamId)
+    if (streamState == null) {
+      val message = s"Stream ${streamChunkSlice.streamId} is not registered 
with worker. " +
+        "This can happen if the worker was restart recently."

Review Comment:
   The error message has a grammatical typo: "was restart recently" should be 
"was restarted recently".



##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/FetchHandler.scala:
##########
@@ -557,6 +557,14 @@ class FetchHandler(
       s" to fetch block $streamChunkSlice")
 
     val streamState = 
chunkStreamManager.getStreamState(streamChunkSlice.streamId)
+    if (streamState == null) {
+      val message = s"Stream ${streamChunkSlice.streamId} is not registered 
with worker. " +
+        "This can happen if the worker was restart recently."
+      logError(message)
+      workerSource.incCounter(WorkerSource.FETCH_LOCAL_CHUNK_FAIL_COUNT)
+      client.getChannel.writeAndFlush(new ChunkFetchFailure(streamChunkSlice, 
message))

Review Comment:
   In the `streamState == null` branch, incrementing 
`FETCH_LOCAL_CHUNK_FAIL_COUNT` will attribute "unregistered stream" failures to 
*local* chunk fetches, even though the storage type is unknown. Consider 
adding/using a dedicated counter for this condition (or otherwise avoiding 
storage-specific metrics here) to keep monitoring accurate.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to