Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0728af6aa |
No files matched your search
@@ -88,7 +88,7 @@ After=network.target
|
||||
Documentation=https://docs.keydb.dev, man:${BINARY}(1)
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/${BINARY} /etc/keydb/${NAMESPACED}.conf
|
||||
ExecStop=/bin/kill -s TERM \$MAINPID
|
||||
PIDFile=/var/run/${NAMESPACED}/${BINARY}.pid
|
||||
|
||||
@@ -90,7 +90,7 @@ After=network.target
|
||||
Documentation=https://docs.keydb.dev, man:${BINARY}(1)
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/${BINARY} /etc/keydb/${NAMESPACED}.conf
|
||||
ExecStop=/bin/kill -s TERM \$MAINPID
|
||||
PIDFile=/var/run/${NAMESPACED}/${BINARY}.pid
|
||||
|
||||
@@ -4,7 +4,7 @@ After=network.target
|
||||
Documentation=https://docs.keydb.dev, man:keydb-server(1)
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/keydb-server /etc/keydb/keydb.conf
|
||||
ExecStop=/bin/kill -s TERM $MAINPID
|
||||
PIDFile=/var/run/keydb/keydb-server.pid
|
||||
|
||||
+10
-7
@@ -2607,12 +2607,15 @@ void clusterStorageLoadCallback(const char *rgchkey, size_t cch, void *)
|
||||
slotToKeyUpdateKeyCore(rgchkey, cch, true /*add*/);
|
||||
}
|
||||
|
||||
void moduleLoadCallback(const char * rgchKey, size_t cchKey, void *data) {
|
||||
if (g_pserver->cluster_enabled) {
|
||||
clusterStorageLoadCallback(rgchKey, cchKey, data);
|
||||
}
|
||||
robj *keyobj = createEmbeddedStringObject(rgchKey, cchKey);
|
||||
moduleNotifyKeyspaceEvent(NOTIFY_LOADED, "loaded", keyobj, *(int *)data);
|
||||
void moduleLoadCallback(const char * rgchKey, size_t, void *data) {
|
||||
redisObjectStack keyobj;
|
||||
initStaticStringObject(keyobj, const_cast<char *>(rgchKey));
|
||||
moduleNotifyKeyspaceEvent(NOTIFY_LOADED, "loaded", &keyobj, *(int *)data);
|
||||
}
|
||||
|
||||
void moduleClusterLoadCallback(const char * rgchKey, size_t cchKey, void *data) {
|
||||
clusterStorageLoadCallback(rgchKey, cchKey, data);
|
||||
moduleLoadCallback(rgchKey, cchKey, data);
|
||||
}
|
||||
|
||||
void redisDb::initialize(int id)
|
||||
@@ -2633,7 +2636,7 @@ void redisDb::storageProviderInitialize()
|
||||
{
|
||||
if (g_pserver->m_pstorageFactory != nullptr)
|
||||
{
|
||||
IStorageFactory::key_load_iterator itr = moduleLoadCallback;
|
||||
IStorageFactory::key_load_iterator itr = g_pserver->cluster_enabled ? moduleClusterLoadCallback : moduleLoadCallback;
|
||||
this->setStorageProvider(StorageCache::create(g_pserver->m_pstorageFactory, id, itr, &id));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user