Merge branch 'unstable' into redis_6_merge
Former-commit-id: 9dc8f30e4783d7e2e9749b155f6bf3df57c536a7
This commit is contained in:
commit
d5ed6f1b5e
@ -299,7 +299,7 @@ extern "C" void fastlock_lock(struct fastlock *lock)
|
||||
|
||||
#if defined(__i386__) || defined(__amd64__)
|
||||
__asm__ __volatile__ ("pause");
|
||||
#elif defined(__arm__)
|
||||
#elif defined(__aarch64__)
|
||||
__asm__ __volatile__ ("yield");
|
||||
#endif
|
||||
if ((++cloops % 0x100000) == 0)
|
||||
@ -335,7 +335,7 @@ extern "C" int fastlock_trylock(struct fastlock *lock, int fWeak)
|
||||
|
||||
struct ticket ticket_expect { { { active, active } } };
|
||||
struct ticket ticket_setiflocked { { { active, next } } };
|
||||
if (__atomic_compare_exchange(&lock->m_ticket, &ticket_expect, &ticket_setiflocked, fWeak /*weak*/, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED))
|
||||
if (__atomic_compare_exchange(&lock->m_ticket.u, &ticket_expect.u, &ticket_setiflocked.u, fWeak /*weak*/, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED))
|
||||
{
|
||||
lock->m_depth = 1;
|
||||
tid = gettid();
|
||||
|
@ -279,7 +279,7 @@ void replicationFeedSlave(client *replica, int dictid, robj **argv, int argc, bo
|
||||
if (g_pserver->repl_backlog && fSendRaw) feedReplicationBacklogWithObject(selectcmd);
|
||||
|
||||
/* Send it to slaves */
|
||||
addReply(replica,selectcmd);
|
||||
addReplyAsync(replica,selectcmd);
|
||||
|
||||
if (dictid < 0 || dictid >= PROTO_SHARED_SELECT_CMDS)
|
||||
decrRefCount(selectcmd);
|
||||
@ -291,12 +291,12 @@ void replicationFeedSlave(client *replica, int dictid, robj **argv, int argc, bo
|
||||
* or are already in sync with the master. */
|
||||
|
||||
/* Add the multi bulk length. */
|
||||
addReplyArrayLen(replica,argc);
|
||||
addReplyArrayLenAsync(replica,argc);
|
||||
|
||||
/* Finally any additional argument that was not stored inside the
|
||||
* static buffer if any (from j to argc). */
|
||||
for (int j = 0; j < argc; j++)
|
||||
addReplyBulk(replica,argv[j]);
|
||||
addReplyBulkAsync(replica,argv[j]);
|
||||
}
|
||||
|
||||
/* Propagate write commands to slaves, and populate the replication backlog
|
||||
|
@ -5242,10 +5242,6 @@ int main(int argc, char **argv) {
|
||||
dictSetHashFunctionSeed(hashseed);
|
||||
g_pserver->sentinel_mode = checkForSentinelMode(argc,argv);
|
||||
initServerConfig();
|
||||
for (int iel = 0; iel < MAX_EVENT_LOOPS; ++iel)
|
||||
{
|
||||
initServerThread(g_pserver->rgthreadvar+iel, iel == IDX_EVENT_LOOP_MAIN);
|
||||
}
|
||||
serverTL = &g_pserver->rgthreadvar[IDX_EVENT_LOOP_MAIN];
|
||||
aeAcquireLock(); // We own the lock on boot
|
||||
|
||||
@ -5373,6 +5369,10 @@ int main(int argc, char **argv) {
|
||||
int background = cserver.daemonize && !cserver.supervised;
|
||||
if (background) daemonize();
|
||||
|
||||
for (int iel = 0; iel < MAX_EVENT_LOOPS; ++iel)
|
||||
{
|
||||
initServerThread(g_pserver->rgthreadvar+iel, iel == IDX_EVENT_LOOP_MAIN);
|
||||
}
|
||||
initServer();
|
||||
initNetworking(cserver.cthreads > 1 /* fReusePort */);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user