Skip to content

Commit

Permalink
Make sure to close publisher properly when GR is requested
Browse files Browse the repository at this point in the history
Summary: I missed this when implementing patch publisher. When we send a request for gr, we queue an empty patch chunk and let this check break out of the publish loop. Right now we end up waiting for this for ever and crash on warmboot exit

Differential Revision:
D61443485

Privacy Context Container: L1125642

fbshipit-source-id: 2297df95d13a2784cc42be2f54a0fc67a6917869
  • Loading branch information
Peyman Gardideh authored and facebook-github-bot committed Aug 19, 2024
1 parent 74db115 commit b75719a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fboss/fsdb/client/FsdbPatchPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ folly::coro::Task<void> FsdbPatchPublisher::serveStream(StreamT&& stream) {
XLOG(DBG2) << " Detected cancellation";
break;
}
if (isGracefulServiceLoopCompletionRequested()) {
XLOG(ERR) << "Detected GR cancellation";
throw FsdbClientGRDisconnectException(
"DeltaPublisher disconnectReason: GR");
break;
}
PublisherMessage message;
message.set_patch(std::move(*patch));
co_yield std::move(message);
Expand Down

0 comments on commit b75719a

Please sign in to comment.