mirror of
https://github.com/fluencelabs/redis
synced 2025-06-21 04:51:32 +00:00
TLS: Implement support for write barrier.
This commit is contained in:
committed by
Yossi Gottlieb
parent
5a47794606
commit
6b6294807c
11
src/server.c
11
src/server.c
@ -2048,6 +2048,11 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
|
||||
void beforeSleep(struct aeEventLoop *eventLoop) {
|
||||
UNUSED(eventLoop);
|
||||
|
||||
/* Handle TLS pending data. (must be done before flushAppendOnlyFile) */
|
||||
tlsProcessPendingData();
|
||||
/* If tls still has pending unread data don't sleep at all. */
|
||||
aeDontWait(server.el, tlsHasPendingData());
|
||||
|
||||
/* Call the Redis Cluster before sleep function. Note that this function
|
||||
* may change the state of Redis Cluster (from ok to fail or vice versa),
|
||||
* so it's a good idea to call it before serving the unblocked clients
|
||||
@ -2093,11 +2098,6 @@ void beforeSleep(struct aeEventLoop *eventLoop) {
|
||||
/* Handle writes with pending output buffers. */
|
||||
handleClientsWithPendingWritesUsingThreads();
|
||||
|
||||
/* TODO: How do i handle write barriers flag */
|
||||
tlsProcessPendingData();
|
||||
/* If tls already has pending unread data don't sleep at all. */
|
||||
aeDontWait(server.el, tlsHasPendingData());
|
||||
|
||||
/* Close clients that need to be closed asynchronous */
|
||||
freeClientsInAsyncFreeQueue();
|
||||
|
||||
@ -2286,6 +2286,7 @@ void initServerConfig(void) {
|
||||
server.aof_rewrite_min_size = AOF_REWRITE_MIN_SIZE;
|
||||
server.aof_rewrite_base_size = 0;
|
||||
server.aof_rewrite_scheduled = 0;
|
||||
server.aof_flush_sleep = 0;
|
||||
server.aof_last_fsync = time(NULL);
|
||||
server.aof_rewrite_time_last = -1;
|
||||
server.aof_rewrite_time_start = -1;
|
||||
|
Reference in New Issue
Block a user