Remove the DB lock, its unnecessary

This commit is contained in:
John Sully committed 2019-10-24 20:18:48 -04:00
1 parent 4396682c07
commit 631f863dd8
3 files changed
+1 -7

No files matched your search

-3
View File
@@ -3003,7 +3003,6 @@ int processEventsWhileBlocked(int iel) {
{
serverAssert(c->flags & CLIENT_PROTECTED);
c->lock.unlock();
c->db->lock.unlock();
}
aeReleaseLock();
while (iterations--) {
@@ -3017,8 +3016,6 @@ int processEventsWhileBlocked(int iel) {
if (c != nullptr)
c->lock.lock();
locker.arm(c);
if (c != nullptr)
c->db->lock.lock();
locker.release();
return count;
}
-1
View File
@@ -3704,7 +3704,6 @@ int processCommand(client *c, int callFlags) {
queueMultiCommand(c);
addReply(c,shared.queued);
} else {
std::unique_lock<decltype(c->db->lock)> ulock(c->db->lock);
call(c,callFlags);
c->woff = g_pserver->master_repl_offset;
if (listLength(g_pserver->ready_keys))
+1 -3
View File
@@ -1044,7 +1044,7 @@ typedef struct clientReplyBlock {
* database. The database number is the 'id' field in the structure. */
typedef struct redisDb {
redisDb()
: expireitr(nullptr), lock("redisDB")
: expireitr(nullptr)
{};
dict *pdict; /* The keyspace for this DB */
expireset *setexpire;
@@ -1057,8 +1057,6 @@ typedef struct redisDb {
long long last_expire_set; /* when the last expire was set */
double avg_ttl; /* Average TTL, just for stats */
list *defrag_later; /* List of key names to attempt to defrag one by one, gradually. */
fastlock lock;
} redisDb;
/* Client MULTI/EXEC state */