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