Merge branch 'async_commands' of https://gitlab.eqalpha.com/keydb-dev/KeyDB-Pro into async_commands
Former-commit-id: 393add1f3d70f7d1e09ecbce60c65508bc06394d
This commit is contained in:
commit
acfa705d48
@ -2712,7 +2712,7 @@ void readQueryFromClient(connection *conn) {
|
||||
|
||||
if (cserver.cthreads > 1) {
|
||||
parseClientCommandBuffer(c);
|
||||
if (g_pserver->enable_async_commands && (aeLockContention() || g_fTestMode))
|
||||
if (g_pserver->enable_async_commands && listLength(g_pserver->monitors) == 0 && (aeLockContention() || g_fTestMode))
|
||||
processInputBuffer(c, false, CMD_CALL_SLOWLOG | CMD_CALL_STATS | CMD_CALL_ASYNC);
|
||||
if (!c->vecqueuedcmd.empty())
|
||||
serverTL->vecclientsProcess.push_back(c);
|
||||
|
@ -1601,23 +1601,22 @@ robj *deserializeStoredStringObject(const char *data, size_t cb)
|
||||
newObject = createObject(OBJ_STRING, nullptr);
|
||||
newObject->encoding = oT->encoding;
|
||||
newObject->m_ptr = oT->m_ptr;
|
||||
return newObject;
|
||||
break;
|
||||
|
||||
case OBJ_ENCODING_EMBSTR:
|
||||
newObject = createEmbeddedStringObject(szFromObj(oT), sdslen(szFromObj(oT)));
|
||||
return newObject;
|
||||
break;
|
||||
|
||||
case OBJ_ENCODING_RAW:
|
||||
newObject = createObject(OBJ_STRING, sdsnewlen(SDS_NOINIT,cb-sizeof(robj)-sizeof(uint64_t)));
|
||||
newObject->lru = oT->lru;
|
||||
memcpy(newObject->m_ptr, data+sizeof(robj)+sizeof(mvcc), cb-sizeof(robj)-sizeof(mvcc));
|
||||
return newObject;
|
||||
break;
|
||||
|
||||
default:
|
||||
serverPanic("Unknown string object encoding from storage");
|
||||
}
|
||||
setMvccTstamp(newObject, mvcc);
|
||||
newObject->setrefcount(1);
|
||||
|
||||
return newObject;
|
||||
}
|
||||
|
@ -4777,7 +4777,7 @@ int processCommand(client *c, int callFlags) {
|
||||
* the event loop since there is a busy Lua script running in timeout
|
||||
* condition, to avoid mixing the propagation of scripts with the
|
||||
* propagation of DELs due to eviction. */
|
||||
if (g_pserver->maxmemory && !g_pserver->lua_timedout) {
|
||||
if (g_pserver->maxmemory && !g_pserver->lua_timedout && !(callFlags & CMD_CALL_ASYNC)) {
|
||||
int out_of_memory = (performEvictions(false /*fPreSnapshot*/) == EVICT_FAIL);
|
||||
/* freeMemoryIfNeeded may flush replica output buffers. This may result
|
||||
* into a replica, that may be the active client, to be freed. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user