Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async flash #781

Open
wants to merge 72 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
1e67982
async flash start
JohnSully Sep 18, 2023
e95c8b4
Initial async impl
JohnSully Sep 25, 2023
f0e8c6f
Use MultiGet
JohnSully Sep 25, 2023
cdc5e8f
Remove a global lock
JohnSully Sep 25, 2023
71b92e7
Avoid 0 size batches
JohnSully Sep 25, 2023
b0935de
More fixes
JohnSully Sep 26, 2023
7e745ef
Inform the kernel when we won't need the disk reserve
JohnSully Nov 7, 2023
a4ca527
Free up the disk repl buffer when its not being used
JohnSully Nov 7, 2023
0b5b0c0
want to correctly cache the system total memory always, as force-evic…
msotheeswaran-sc Nov 15, 2023
f53dbd3
commitChanges async api
Oct 24, 2023
eea48c5
missed changes
Oct 24, 2023
e874752
some fixes
Oct 25, 2023
4c014ee
build fixes
Oct 25, 2023
1129f67
correcting classname
Oct 30, 2023
de73b2c
missed changes
Oct 31, 2023
4818ddf
fixed some errors
Nov 3, 2023
0cf263c
reverting changes of async io rocksdb option as this is version depe…
Nov 6, 2023
567ef8d
removing unwanted loc
Nov 8, 2023
b6b7b1b
whitespace removed
Nov 8, 2023
1d59efb
review rework, added serverassert default switch case,removed debug p…
Nov 8, 2023
c889505
add support for overload-ignorelist (#237)
msotheeswaran-sc Nov 17, 2023
20ae39d
update insufficient replicas metrics to separate severity
zliang-sc Nov 27, 2023
8a5857d
Overload CPU reading metric (#240)
jbohac-sc Nov 27, 2023
8fec9ba
emit number of active replicas metrics instead
zliang-sc Nov 28, 2023
443e1af
add cool
zliang-sc Nov 28, 2023
18d6241
Merge branch 'main' into improve-insufficient-replica-alarm
zliang-sc Nov 28, 2023
deb139e
Merge pull request #241 from Snapchat/improve-insufficient-replica-alarm
zliang-sc Nov 28, 2023
49afd8f
update overload-ignore-list to accept subnets as well (#239)
msotheeswaran-sc Dec 4, 2023
bb115ca
add overload-protect-tenacity to configure how many clients to evict …
msotheeswaran-sc Dec 8, 2023
bb7c5a4
TLS cname loadshedding ignore list (#242)
jbohac-sc Dec 8, 2023
e1935a7
refactor asyncwrite and asyncread work queue
Nov 22, 2023
3d4c5a0
Fix compile warning
JohnSully Jan 11, 2024
b74652a
change overload protection to sending -OVERLOAD errors instead of dis…
msotheeswaran-sc Jan 23, 2024
2b01c6c
handle nodes in handshake state in statsd module cluster nodes metric…
msotheeswaran-sc Jan 25, 2024
7a32cf9
reset replica offsets after resetting replication buffer (#247)
msotheeswaran-sc Jan 26, 2024
d1484aa
Add redis bloom module (#252)
msotheeswaran-sc Jan 30, 2024
5681d06
Fix replication rdb load timeout (#251)
msotheeswaran-sc Jan 30, 2024
77eaaa2
skip memefficiency tests in CI as they are inconsistent (#250)
msotheeswaran-sc Jan 30, 2024
65b9165
Fix crash in replica replaying storage op
JohnSully Jan 31, 2024
989421e
Prevent crash on client disconnecting while I/O in flight
JohnSully Jan 31, 2024
7b50232
Merge branch 'main' into async_flash
JohnSully Jan 31, 2024
195828e
Log hitrate metric in modstatsd (#255)
acope-sc Feb 15, 2024
cba3998
Limit repl buffer writes per event loop (#256)
acope-sc Feb 21, 2024
752f204
Fix for hit rate metric (#257)
acope-sc Feb 22, 2024
490ee84
Merge branch 'main' into async_flash
JohnSully Feb 29, 2024
c08683e
Return set to vector for clients to be processed ensuring we run them…
JohnSully Mar 1, 2024
260f47b
Do not create threadpools if we won't need them
JohnSully Mar 1, 2024
e5f8e77
Fix test failure due to slowness with many DBs
JohnSully Mar 1, 2024
e7ab275
Fix linker issues with newer linkers
JohnSully Mar 4, 2024
8f2dbc3
Fix crash
JohnSully Mar 5, 2024
c5c4779
Fix hung clients
JohnSully Mar 5, 2024
8c4fa5d
Fix typo in test path
JohnSully Mar 5, 2024
7a488a8
Serialize writes due to races causing test failures
JohnSully Mar 5, 2024
8a2016a
Enable key cache for async reads
JohnSully Mar 5, 2024
bff8b73
Fix ARM CI
JohnSully Mar 5, 2024
6c15c43
Build with flash
JohnSully Mar 5, 2024
fe5503a
Emit maxstorage metric
JohnSully Mar 7, 2024
c83c55f
Fix expire tracking assert failure
JohnSully Mar 8, 2024
ad2a282
Disable swapdb with flash since it doesn't work
JohnSully Mar 8, 2024
088a1db
Ensure cluster tests run in flash mode in CI
JohnSully Mar 8, 2024
d84fa52
Fix crash in FLASH eviction
JohnSully Mar 8, 2024
559588b
Disable swapdb tests with flash
JohnSully Mar 8, 2024
5fbe991
Fixup ifdef for easier switching
JohnSully Mar 18, 2024
a430473
Fix asserts after RDB load with FLASH
JohnSully Mar 19, 2024
0267bc5
Add FLASH tests to CI
JohnSully Mar 19, 2024
f5e367d
Fix hash count mismatch asserts for getKeysInSlot
JohnSully Mar 19, 2024
41733d7
Add data on actual disk used that is compared to maxstorage
JohnSully Mar 20, 2024
bb1780a
Fix warning
JohnSully Mar 20, 2024
e580a8e
Handle pending IO fastsync
JohnSully Apr 4, 2024
c50e2d4
Fix fastsync test failures caused by closing due to repl buffer size …
JohnSully Apr 5, 2024
66be482
Naming fix
JohnSully Apr 5, 2024
f886fce
Prevent erroneous socket closure
JohnSully Apr 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,25 @@ machamp:
parent: make-build
# https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04
builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/keydb/keydb-ubuntu-20-04@sha256:cf869a3f5d1de1e1d976bb906689c37b7031938eb68661b844a38c532f27248c
command: ./runtest --clients 4 --verbose --tls
command: ./runtest --clients 4 --verbose --tls --skipunit unit/memefficiency
tests-with-flash:
type: cmd
parent: make-build
# https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04
builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/keydb/keydb-ubuntu-20-04@sha256:cf869a3f5d1de1e1d976bb906689c37b7031938eb68661b844a38c532f27248c
command: ./runtest --verbose --skipunit unit/memefficiency --flash
cluster-test:
type: cmd
parent: make-build
# https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04
builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/keydb/keydb-ubuntu-20-04@sha256:cf869a3f5d1de1e1d976bb906689c37b7031938eb68661b844a38c532f27248c
command: ./runtest-cluster --tls
cluster-test-flash:
type: cmd
parent: make-build
# https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04
builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/keydb/keydb-ubuntu-20-04@sha256:cf869a3f5d1de1e1d976bb906689c37b7031938eb68661b844a38c532f27248c
command: ./runtest-cluster --tls --flash
sentinel-test:
type: cmd
parent: make-build
Expand Down Expand Up @@ -59,7 +71,7 @@ machamp:
# to ensure a clearer docker build env
code-checkout:
type: cmd
command: echo checkout
command: echo checkout && git submodule init && git submodule update
# default machamp builder image does not work for multi arch
builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/ubuntu/ubuntu-23-04@sha256:bd43177a80e6ce1c3583e8ea959b88a9081c0f56b765ec9c5a157c27a637c23b
docker:
Expand Down
10 changes: 10 additions & 0 deletions ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ on:
# references a build defined in build.yaml
build_name: keydb-docker-build
arch_types: ["amd64", "arm64"]
# Doc: go/cool-guide
cool:
workflows:
- workflow_type: backend_workflow
build_name: keydb-build
arch_types: ["amd64", "arm64"]
- workflow_type: backend_workflow
# references a build defined in build.yaml
build_name: keydb-docker-build
arch_types: ["amd64", "arm64"]

# below defines which branch is release branch / release tag
machamp:
Expand Down
22 changes: 20 additions & 2 deletions machamp_scripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN set -eux; \
gosu nobody true
# build KeyDB
ARG MAKE_JOBS=""
ARG ENABLE_FLASH=""
ARG ENABLE_FLASH="yes"
COPY . /tmp/keydb-internal
RUN set -eux; \
cd /tmp/keydb-internal; \
Expand Down Expand Up @@ -73,7 +73,25 @@ RUN set -eux; \
| xargs -r apt-mark manual \
; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
rm -rf /var/lib/apt/lists/*
# build RedisBloom
RUN set -eux; \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confnew" install -qqy --no-install-recommends \
ca-certificates \
wget \
make \
pkg-config \
build-essential \
git; \
git clone --recursive https://github.com/RedisBloom/RedisBloom.git; \
cd RedisBloom; \
./sbin/setup; \
bash -l; \
make; \
redisBloomPath=`make run -n | awk '{print $NF}'`; \
cp $redisBloomPath /usr/local/lib/
# create working directories and organize files
RUN \
mkdir /data && chown keydb:keydb /data; \
Expand Down
3 changes: 2 additions & 1 deletion pkg/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN set -eux; \
grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' ./src/config.cpp; \
sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' ./src/config.cpp; \
grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' ./src/config.cpp; \
make -j$(nproc) BUILD_TLS=yes; \
make -j$(nproc) BUILD_TLS=yes ENABLE_FLASH=yes; \
cd src; \
strip keydb-cli keydb-benchmark keydb-check-rdb keydb-check-aof keydb-diagnostic-tool keydb-sentinel keydb-server; \
mv keydb-server keydb-cli keydb-benchmark keydb-check-rdb keydb-check-aof keydb-diagnostic-tool keydb-sentinel /usr/local/bin/; \
Expand Down Expand Up @@ -83,6 +83,7 @@ RUN \
sed -i 's/^\(logfile .*\)$/# \1/' /etc/keydb/keydb.conf; \
sed -i 's/protected-mode yes/protected-mode no/g' /etc/keydb/keydb.conf; \
sed -i 's/^\(bind .*\)$/# \1/' /etc/keydb/keydb.conf; \
cd /usr/local/bin; \
ln -s keydb-cli redis-cli; \
cd /etc/keydb; \
ln -s keydb.conf redis.conf; \
Expand Down
7 changes: 4 additions & 3 deletions pkg/docker/Dockerfile_Alpine
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN mkdir -p /etc/keydb
ARG BRANCH
RUN set -eux; \
\
apk add --no-cache su-exec; \
apk add --no-cache su-exec tini; \
apk add --no-cache --virtual .build-deps \
coreutils \
gcc \
Expand All @@ -32,7 +32,7 @@ RUN set -eux; \
grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' ./src/config.cpp; \
sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' ./src/config.cpp; \
grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' ./src/config.cpp; \
make -j$(nproc) BUILD_TLS=yes; \
make -j$(nproc) BUILD_TLS=yes ENABLE_FLASH=yes; \
cd src; \
strip keydb-cli keydb-benchmark keydb-check-rdb keydb-check-aof keydb-diagnostic-tool keydb-sentinel keydb-server; \
mv keydb-server keydb-cli keydb-benchmark keydb-check-rdb keydb-check-aof keydb-diagnostic-tool keydb-sentinel /usr/local/bin/; \
Expand All @@ -54,6 +54,7 @@ RUN set -eux; \
sed -i 's/^\(logfile .*\)$/# \1/' /etc/keydb/keydb.conf; \
sed -i 's/protected-mode yes/protected-mode no/g' /etc/keydb/keydb.conf; \
sed -i 's/^\(bind .*\)$/# \1/' /etc/keydb/keydb.conf; \
cd /usr/local/bin; \
ln -s keydb-cli redis-cli; \
cd /etc/keydb; \
ln -s keydb.conf redis.conf; \
Expand All @@ -76,6 +77,6 @@ RUN set -eux; \
chmod +x /usr/local/bin/docker-entrypoint.sh
VOLUME /data
WORKDIR /data
ENTRYPOINT ["docker-entrypoint.sh"]
ENTRYPOINT ["tini", "--", "docker-entrypoint.sh"]
EXPOSE 6379
CMD ["keydb-server", "/etc/keydb/keydb.conf"]
21 changes: 21 additions & 0 deletions src/IStorage.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
#pragma once
#include <functional>
#include <unordered_set>
#include "sds.h"
#include "ae.h"
#include <string>

#define METADATA_DB_IDENTIFIER "c299fde0-6d42-4ec4-b939-34f680ffe39f"

struct StorageToken {
enum class TokenType {
SingleRead,
SingleWrite,
Delete,
BatchWrite,
};
TokenType type;
std::unordered_set<struct client *> setc;
struct redisDbPersistentData *db;
virtual ~StorageToken() {}
};

class IStorageFactory
{
public:
Expand Down Expand Up @@ -36,6 +51,12 @@ class IStorage
virtual bool enumerate_hashslot(callback fn, unsigned int hashslot) const = 0;
virtual size_t count() const = 0;

virtual StorageToken *begin_retrieve(struct aeEventLoop *, aePostFunctionTokenProc, sds *, size_t) {return nullptr;};
virtual void complete_retrieve(StorageToken * /*tok*/, callbackSingle /*fn*/) {};

virtual StorageToken* begin_endWriteBatch(struct aeEventLoop *, aePostFunctionTokenProc*) { return nullptr; } // NOP
virtual void complete_endWriteBatch(StorageToken * /*tok*/) {};

virtual void bulkInsert(char **rgkeys, size_t *rgcbkeys, char **rgvals, size_t *rgcbvals, size_t celem) {
beginWriteBatch();
for (size_t ielem = 0; ielem < celem; ++ielem) {
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ ifneq ($(strip $(SANITIZE)),)
endif

ifeq ($(ENABLE_FLASH),yes)
FINAL_LIBS+= ../deps/rocksdb/librocksdb.a
FINAL_LIBS+= -lz -lcrypto -lbz2 -lzstd -llz4 -lsnappy
CXXFLAGS+= -I../deps/rocksdb/include/ -DENABLE_ROCKSDB
STORAGE_OBJ+= storage/rocksdb.o storage/rocksdbfactory.o
FINAL_LIBS+= ../deps/rocksdb/librocksdb.a
DEPENDENCY_TARGETS+= rocksdb
endif

Expand Down
5 changes: 0 additions & 5 deletions src/SnapshotPayloadParseState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,6 @@ void SnapshotPayloadParseState::trimState() {

if (stackParse.empty()) {
flushQueuedKeys();
while (*insertsInFlight > 0) {
// TODO: ProcessEventsWhileBlocked
aeReleaseLock();
aeAcquireLock();
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/SnapshotPayloadParseState.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ class SnapshotPayloadParseState {
void pushValue(const char *rgch, long long cch);
void pushValue(long long value);
bool shouldThrottle() const { return *insertsInFlight > (cserver.cthreads*4); }
bool hasIOInFlight() const { return *insertsInFlight > 0; }
};
27 changes: 26 additions & 1 deletion src/StorageCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,30 @@ void StorageCache::retrieve(sds key, IStorage::callbackSingle fn) const
m_spstorage->retrieve(key, sdslen(key), fn);
}

StorageToken *StorageCache::begin_retrieve(struct aeEventLoop *el, aePostFunctionTokenProc proc, sds *rgkey, size_t ckey) {
std::unique_lock<fastlock> ul(m_lock);
if (m_pdict != nullptr)
{
bool fAnyKey = false;
for (size_t ik = 0; ik < ckey; ++ik) {
uint64_t hash = dictSdsHash(rgkey[ik]);
dictEntry *de = dictFind(m_pdict, reinterpret_cast<void*>(hash));

if (de != nullptr)
fAnyKey = true;
}
if (!fAnyKey)
return nullptr; // All keys are missing - skip the io
}
ul.unlock();

return m_spstorage->begin_retrieve(el, proc, rgkey, ckey);
}

void StorageCache::complete_retrieve(StorageToken *tok, IStorage::callbackSingle fn) {
m_spstorage->complete_retrieve(tok, fn);
}

size_t StorageCache::count() const
{
std::unique_lock<fastlock> ul(m_lock, std::defer_lock);
Expand All @@ -233,4 +257,5 @@ void StorageCache::emergencyFreeCache() {
dictRelease(d);
});
}
}
}

4 changes: 4 additions & 0 deletions src/StorageCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class StorageCache
void insert(sds key, const void *data, size_t cbdata, bool fOverwrite);
void bulkInsert(char **rgkeys, size_t *rgcbkeys, char **rgvals, size_t *rgcbvals, size_t celem);
void retrieve(sds key, IStorage::callbackSingle fn) const;
StorageToken *begin_retrieve(struct aeEventLoop *el, aePostFunctionTokenProc proc, sds *rgkey, size_t ckey);
void complete_retrieve(StorageToken *tok, IStorage::callbackSingle fn);
StorageToken* begin_endWriteBatch(struct aeEventLoop *el, aePostFunctionTokenProc* proc) {return m_spstorage->begin_endWriteBatch(el,proc);} // NOP
void complete_endWriteBatch(StorageToken *tok) {m_spstorage->complete_endWriteBatch(tok);};
bool erase(sds key);
void emergencyFreeCache();
bool keycacheIsEnabled() const { return m_pdict != nullptr; }
Expand Down
29 changes: 29 additions & 0 deletions src/ae.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ enum class AE_ASYNC_OP
PostCppFunction,
DeleteFileEvent,
CreateFileEvent,
PostAsynDBFunction,

};

struct aeCommand
Expand All @@ -125,6 +127,8 @@ struct aeCommand
aePostFunctionProc *proc;
aeFileProc *fproc;
std::function<void()> *pfn;
aePostFunctionTokenProc* tproc;

};
void *clientData;
};
Expand Down Expand Up @@ -175,6 +179,17 @@ void aeProcessCmd(aeEventLoop *eventLoop, int fd, void *, int )
(*cmd.pfn)();

delete cmd.pfn;
break;
}
case AE_ASYNC_OP::PostAsynDBFunction:
{ //added to support async api IStorage
if (cmd.fLock && !ulock.owns_lock()) {
g_forkLock.releaseRead();
ulock.lock();
g_forkLock.acquireRead();
}
((aePostFunctionTokenProc*)cmd.tproc)(eventLoop,(StorageToken*)cmd.clientData);
break;
}
break;
}
Expand Down Expand Up @@ -256,6 +271,20 @@ int aePostFunction(aeEventLoop *eventLoop, aePostFunctionProc *proc, void *arg)
return AE_OK;
}

int aePostFunction(aeEventLoop *eventLoop, aePostFunctionTokenProc *proc, StorageToken *token)
{
//added to support async api IStorage
aeCommand cmd = {};
cmd.op = AE_ASYNC_OP::PostAsynDBFunction;
cmd.tproc = proc;
cmd.clientData = (void*)token;
cmd.fLock = false;
auto size = write(eventLoop->fdCmdWrite, &cmd, sizeof(cmd));
if (size != sizeof(cmd))
return AE_ERR;
return AE_OK;
}

int aePostFunction(aeEventLoop *eventLoop, std::function<void()> fn, bool fLock, bool fForceQueue)
{
if (eventLoop == g_eventLoopThisThread && !fForceQueue)
Expand Down
6 changes: 5 additions & 1 deletion src/ae.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ extern "C" {
#define AE_NOTUSED(V) ((void) V)

struct aeEventLoop;

/* Types and data structures */
typedef void aeFileProc(struct aeEventLoop *eventLoop, int fd, void *clientData, int mask);
typedef int aeTimeProc(struct aeEventLoop *eventLoop, long long id, void *clientData);
typedef void aeEventFinalizerProc(struct aeEventLoop *eventLoop, void *clientData);
typedef void aeBeforeSleepProc(struct aeEventLoop *eventLoop);
typedef void aePostFunctionProc(void *pvArgs);
//added to support async api IStorage
struct StorageToken;
typedef void aePostFunctionTokenProc(struct aeEventLoop *el, struct StorageToken *token);

/* File event structure */
typedef struct aeFileEvent {
Expand Down Expand Up @@ -134,6 +136,8 @@ int aePostFunction(aeEventLoop *eventLoop, aePostFunctionProc *proc, void *arg);
#ifdef __cplusplus
} // EXTERN C
int aePostFunction(aeEventLoop *eventLoop, std::function<void()> fn, bool fLock = true, bool fForceQueue = false);
//added to support async api IStorage
int aePostFunction(aeEventLoop *eventLoop, aePostFunctionTokenProc *proc, StorageToken *token);
extern "C" {
#endif
void aeDeleteEventLoop(aeEventLoop *eventLoop);
Expand Down
5 changes: 4 additions & 1 deletion src/blocked.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ void blockClient(client *c, int btype) {
/* Master client should never be blocked unless pause or module */
serverAssert(!(c->flags & CLIENT_MASTER &&
btype != BLOCKED_MODULE &&
btype != BLOCKED_PAUSE));
btype != BLOCKED_PAUSE &&
btype != BLOCKED_STORAGE));

c->flags |= CLIENT_BLOCKED;
c->btype = btype;
Expand Down Expand Up @@ -207,6 +208,8 @@ void unblockClient(client *c) {
} else if (c->btype == BLOCKED_PAUSE) {
listDelNode(g_pserver->paused_clients,c->paused_list_node);
c->paused_list_node = NULL;
} else if (c->btype == BLOCKED_STORAGE) {
serverTL->vecclientsProcess.push_back(c);
} else {
serverPanic("Unknown btype in unblockClient().");
}
Expand Down
Loading
Loading