greatsharp commented on code in PR #3077:
URL: https://github.com/apache/kvrocks/pull/3077#discussion_r2362114120
##########
src/cluster/batch_sender.cc:
##########
@@ -100,7 +100,7 @@ Status BatchSender::sendApplyBatchCmd(int fd, const
rocksdb::WriteBatch &write_b
GET_OR_RET(util::SockSend(fd, redis::ArrayOfBulkStrings({"APPLYBATCH",
write_batch.Data()})));
- std::string line = GET_OR_RET(util::SockReadLine(fd));
+ std::string line = GET_OR_RET(util::SockReadLineWithRetry(fd, 10, 500));
Review Comment:
I am also confused here, util::SocketConnect returns a blocking socket fd,
but how could a blocking socket report EAGAIN or EWOULDBLOCK error?
Add below test logic after dst_fd_.Reset(*result) in
SlotMigrator::startMigration() method,
`
int flags = fcntl(*result, F_GETFL, 0);
if ((flags & O_NONBLOCK) == 0) {
LOG(ERROR) << "block socket";
} else {
LOG(ERROR) << "non_block socket";
}
`
the log print out "block socket"
--
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]