mirror of
https://github.com/wassname/ray.git
synced 2026-07-29 11:26:04 +08:00
Allow plasma manager to gracefully handle EPROTOTYPE. (#802)
* Allow plasma manager to gracefully handle EPROTOTYPE. * Fix linting.
This commit is contained in:
committed by
Philipp Moritz
parent
fcd07b10b5
commit
37282330c0
@@ -47,15 +47,34 @@ int handle_sigpipe(Status s, int fd) {
|
||||
if (s.ok()) {
|
||||
return 0;
|
||||
}
|
||||
if (errno == EPIPE || errno == EBADF || errno == ECONNRESET) {
|
||||
|
||||
switch (errno) {
|
||||
case EPIPE: {
|
||||
ARROW_LOG(WARNING)
|
||||
<< "Received SIGPIPE, BAD FILE DESCRIPTOR, or ECONNRESET when "
|
||||
"sending a message to client on fd "
|
||||
<< fd << ". The client on the other end may "
|
||||
"have hung up.";
|
||||
return errno;
|
||||
<< "Received EPIPE when sending a message to client on fd " << fd
|
||||
<< ". The client on the other end may have hung up.";
|
||||
} break;
|
||||
case EBADF: {
|
||||
ARROW_LOG(WARNING)
|
||||
<< "Received EBADF when sending a message to client on fd " << fd
|
||||
<< ". The client on the other end may have hung up.";
|
||||
} break;
|
||||
case ECONNRESET: {
|
||||
ARROW_LOG(WARNING)
|
||||
<< "Received ECONNRESET when sending a message to client on fd " << fd
|
||||
<< ". The client on the other end may have hung up.";
|
||||
} break;
|
||||
case EPROTOTYPE: {
|
||||
/* TODO(rkn): What triggers this case? */
|
||||
ARROW_LOG(WARNING)
|
||||
<< "Received EPROTOTYPE when sending a message to client on fd " << fd
|
||||
<< ". The client on the other end may have hung up.";
|
||||
} break;
|
||||
default:
|
||||
/* This code should be unreachable. */
|
||||
CHECK(0);
|
||||
LOG_FATAL("Failed to write message to client on fd %d", fd);
|
||||
}
|
||||
ARROW_LOG(FATAL) << "Failed to write message to client on fd " << fd << ".";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user