Merge branch 'unstable' into keydbpro
Former-commit-id: 642719cef20a88d23af84a16d3f6757088c23b1a
This commit is contained in:
commit
0962c5f366
14
TLS.md
14
TLS.md
@ -51,19 +51,7 @@ Connections
|
||||
All socket operations now go through a connection abstraction layer that hides
|
||||
I/O and read/write event handling from the caller.
|
||||
|
||||
**Multi-threading I/O is not currently supported for TLS**, as a TLS connection
|
||||
needs to do its own manipulation of AE events which is not thread safe. The
|
||||
solution is probably to manage independent AE loops for I/O threads and longer
|
||||
term association of connections with threads. This may potentially improve
|
||||
overall performance as well.
|
||||
|
||||
Sync IO for TLS is currently implemented in a hackish way, i.e. making the
|
||||
socket blocking and configuring socket-level timeout. This means the timeout
|
||||
value may not be so accurate, and there would be a lot of syscall overhead.
|
||||
However I believe that getting rid of syncio completely in favor of pure async
|
||||
work is probably a better move than trying to fix that. For replication it would
|
||||
probably not be so hard. For cluster keys migration it might be more difficult,
|
||||
but there are probably other good reasons to improve that part anyway.
|
||||
Note that unlike Redis, KeyDB fully supports multithreading of TLS connections.
|
||||
|
||||
To-Do List
|
||||
----------
|
||||
|
@ -1078,7 +1078,9 @@ void serverLogRaw(int level, const char *msg) {
|
||||
|
||||
gettimeofday(&tv,NULL);
|
||||
struct tm tm;
|
||||
nolocks_localtime(&tm,tv.tv_sec,g_pserver->timezone,g_pserver->daylight_active);
|
||||
int daylight_active;
|
||||
__atomic_load(&g_pserver->daylight_active, &daylight_active, __ATOMIC_RELAXED);
|
||||
nolocks_localtime(&tm,tv.tv_sec,g_pserver->timezone,daylight_active);
|
||||
off = strftime(buf,sizeof(buf),"%d %b %Y %H:%M:%S.",&tm);
|
||||
snprintf(buf+off,sizeof(buf)-off,"%03d",(int)tv.tv_usec/1000);
|
||||
if (g_pserver->sentinel_mode) {
|
||||
@ -1886,7 +1888,7 @@ void updateCachedTime(int update_daylight_info) {
|
||||
struct tm tm;
|
||||
time_t ut = g_pserver->unixtime;
|
||||
localtime_r(&ut,&tm);
|
||||
g_pserver->daylight_active = tm.tm_isdst;
|
||||
__atomic_store(&g_pserver->daylight_active, &tm.tm_isdst, __ATOMIC_RELAXED);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user