Cast pointer correctly and fixed MVCC not updating correctly

Former-commit-id: 79bdcf0b3d0c190a24e6b7da50ce05f4e5185d04
This commit is contained in:
VivekSainiEQ 2021-10-27 17:08:37 +00:00
parent a7e7540284
commit 349d9d2c05
3 changed files with 4 additions and 6 deletions

View File

@ -75,7 +75,7 @@ static int aeApiCreate(aeEventLoop *eventLoop) {
return -1;
}
anetCloexec(state->kqfd);
state->eventsMask = zmalloc(EVENT_MASK_MALLOC_SIZE(eventLoop->setsize), MALLOC_LOCAL);
state->eventsMask = (char*)zmalloc(EVENT_MASK_MALLOC_SIZE(eventLoop->setsize), MALLOC_LOCAL);
memset(state->eventsMask, 0, EVENT_MASK_MALLOC_SIZE(eventLoop->setsize));
eventLoop->apidata = state;
return 0;

View File

@ -2798,6 +2798,7 @@ int rdbLoadRio(rio *rdb, int rdbflags, rdbSaveInfo *rsi) {
key = nullptr;
} else {
sdsfree(key);
key = nullptr;
goto eoferr;
}
} else {

View File

@ -4004,12 +4004,9 @@ void call(client *c, int flags) {
/* Call the command. */
dirty = g_pserver->dirty;
prev_err_count = g_pserver->stat_total_error_replies;
g_pserver->fixed_time_expire++;
/* Update cache time, in case we have nested calls we want to
* update only on the first call*/
if (g_pserver->fixed_time_expire++ == 0) {
updateCachedTime(0);
}
updateCachedTime(0);
incrementMvccTstamp();
elapsedStart(&call_timer);
try {