Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f80f4b2e24 | ||
|
|
44206187a2 | ||
|
|
34ac7488eb |
No files matched your search
+1
-1
@@ -2412,7 +2412,7 @@ int serverCronLite(struct aeEventLoop *eventLoop, long long id, void *clientData
|
||||
|
||||
void blockingOperationStarts() {
|
||||
if(!g_pserver->blocking_op_nesting++){
|
||||
__atomic_load(&g_pserver->mstime, &g_pserver->blocked_last_cron, __ATOMIC_ACQUIRE);
|
||||
g_pserver->blocked_last_cron = g_pserver->mstime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+15
-17
@@ -1191,26 +1191,24 @@ void zsetConvert(robj *zobj, int encoding) {
|
||||
zs->dict = dictCreate(&zsetDictType,NULL);
|
||||
zs->zsl = zslCreate();
|
||||
|
||||
if (ziplistLen(zl) > 0) {
|
||||
eptr = ziplistIndex(zl,0);
|
||||
serverAssertWithInfo(NULL,zobj,eptr != NULL);
|
||||
sptr = ziplistNext(zl,eptr);
|
||||
serverAssertWithInfo(NULL,zobj,sptr != NULL);
|
||||
eptr = ziplistIndex(zl,0);
|
||||
serverAssertWithInfo(NULL,zobj,eptr != NULL);
|
||||
sptr = ziplistNext(zl,eptr);
|
||||
serverAssertWithInfo(NULL,zobj,sptr != NULL);
|
||||
|
||||
while (eptr != NULL) {
|
||||
score = zzlGetScore(sptr);
|
||||
serverAssertWithInfo(NULL,zobj,ziplistGet(eptr,&vstr,&vlen,&vlong));
|
||||
if (vstr == NULL)
|
||||
ele = sdsfromlonglong(vlong);
|
||||
else
|
||||
ele = sdsnewlen((char*)vstr,vlen);
|
||||
while (eptr != NULL) {
|
||||
score = zzlGetScore(sptr);
|
||||
serverAssertWithInfo(NULL,zobj,ziplistGet(eptr,&vstr,&vlen,&vlong));
|
||||
if (vstr == NULL)
|
||||
ele = sdsfromlonglong(vlong);
|
||||
else
|
||||
ele = sdsnewlen((char*)vstr,vlen);
|
||||
|
||||
node = zslInsert(zs->zsl,score,ele);
|
||||
serverAssert(dictAdd(zs->dict,ele,&node->score) == DICT_OK);
|
||||
zzlNext(zl,&eptr,&sptr);
|
||||
}
|
||||
node = zslInsert(zs->zsl,score,ele);
|
||||
serverAssert(dictAdd(zs->dict,ele,&node->score) == DICT_OK);
|
||||
zzlNext(zl,&eptr,&sptr);
|
||||
}
|
||||
|
||||
|
||||
zfree(zobj->m_ptr);
|
||||
zobj->m_ptr = zs;
|
||||
zobj->encoding = OBJ_ENCODING_SKIPLIST;
|
||||
|
||||
Reference in new issue
Block a user