Revert "avoid using sendfile if tls-replication is enabled"
This reverts commit b9abecfc4c97db01fa6f09180c68a92ea5974ac1.
This commit is contained in:
parent
bdd5411747
commit
d1e23e04aa
@ -1067,12 +1067,8 @@ void sendBulkToSlave(connection *conn) {
|
||||
}
|
||||
}
|
||||
|
||||
/* If the preamble was already transferred, send the RDB bulk data.
|
||||
* try to use sendfile system call if supported, unless tls is enabled.
|
||||
* fallback to normal read+write otherwise. */
|
||||
nwritten = 0;
|
||||
/* If the preamble was already transferred, send the RDB bulk data. */
|
||||
#if HAVE_SENDFILE
|
||||
if (!server.tls_replication) {
|
||||
if ((nwritten = redis_sendfile(conn->fd,slave->repldbfd,
|
||||
slave->repldboff,PROTO_IOBUF_LEN)) == -1)
|
||||
{
|
||||
@ -1083,9 +1079,7 @@ void sendBulkToSlave(connection *conn) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (!nwritten) {
|
||||
#else
|
||||
ssize_t buflen;
|
||||
char buf[PROTO_IOBUF_LEN];
|
||||
|
||||
@ -1105,8 +1099,7 @@ void sendBulkToSlave(connection *conn) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
slave->repldboff += nwritten;
|
||||
server.stat_net_output_bytes += nwritten;
|
||||
if (slave->repldboff == slave->repldbsize) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user