Remove the DB lock, its unnecessary
Former-commit-id: 631f863dd89cd642e2023beabf8b31cdc84bbdff
This commit is contained in:
parent
b39e6c9497
commit
7bdc24a86d
@ -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;
|
||||
}
|
||||
|
@ -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))
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user