MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / updateAppendonly

Function updateAppendonly

src/config.cpp:2626–2637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2624}
2625
2626static int updateAppendonly(int val, int prev, const char **err) {
2627 UNUSED(prev);
2628 if (val == 0 && g_pserver->aof_state != AOF_OFF) {
2629 stopAppendOnly();
2630 } else if (val && g_pserver->aof_state == AOF_OFF) {
2631 if (startAppendOnly() == C_ERR) {
2632 *err = "Unable to turn on AOF. Check server logs.";
2633 return 0;
2634 }
2635 }
2636 return 1;
2637}
2638
2639static int updateSighandlerEnabled(int val, int prev, const char **err) {
2640 UNUSED(err);

Callers

nothing calls this directly

Calls 2

stopAppendOnlyFunction · 0.85
startAppendOnlyFunction · 0.85

Tested by

no test coverage detected