Make some asserts debug only for perf

Former-commit-id: dc66209f2cf8eadb794dad302bd1ea92890e75b0
This commit is contained in:
John Sully 2021-03-28 18:27:00 +00:00
parent 2e3fd28dcb
commit 84e07e5d24

View File

@ -1662,7 +1662,7 @@ int writeToClient(client *c, int handler_installed) {
ssize_t nwritten = 0, totwritten = 0;
clientReplyBlock *o;
AssertCorrectThread(c);
serverAssertDebug(FCorrectThread(c));
std::unique_lock<decltype(c->lock)> lock(c->lock);
@ -1881,7 +1881,7 @@ int handleClientsWithPendingWrites(int iel, int aof_state) {
processed += (int)vec.size();
for (client *c : vec) {
AssertCorrectThread(c);
serverAssertDebug(FCorrectThread(c));
uint64_t flags = c->flags.fetch_and(~CLIENT_PENDING_WRITE, std::memory_order_relaxed);
@ -2428,8 +2428,8 @@ void readQueryFromClient(connection *conn) {
int nread, readlen;
size_t qblen;
serverAssert(FCorrectThread(c));
serverAssert(!GlobalLocksAcquired());
serverAssertDebug(FCorrectThread(c) sdfsdf);
serverAssertDebug(!GlobalLocksAcquired());
AeLocker aelock;
AssertCorrectThread(c);