Allow load at boot to be cancelled with a shutdown command
Former-commit-id: 2897a59e59bed14a67d1d0abcec5cb6a71bbb15b
This commit is contained in:
parent
553f49507d
commit
6eae02919a
@ -2665,6 +2665,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
~rdbAsyncWorkThread() {
|
~rdbAsyncWorkThread() {
|
||||||
|
fExit = true;
|
||||||
|
while (m_lockPause.fOwnLock())
|
||||||
|
m_lockPause.unlock();
|
||||||
if (m_thread.joinable())
|
if (m_thread.joinable())
|
||||||
endWork();
|
endWork();
|
||||||
}
|
}
|
||||||
|
@ -7394,7 +7394,13 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
InitServerLast();
|
InitServerLast();
|
||||||
loadDataFromDisk();
|
|
||||||
|
try {
|
||||||
|
loadDataFromDisk();
|
||||||
|
} catch (ShutdownException) {
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
if (g_pserver->cluster_enabled) {
|
if (g_pserver->cluster_enabled) {
|
||||||
if (verifyClusterConfigWithData() == C_ERR) {
|
if (verifyClusterConfigWithData() == C_ERR) {
|
||||||
serverLog(LL_WARNING,
|
serverLog(LL_WARNING,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user