Only save MVCC tstamps if its an active replica
Former-commit-id: 5aded7dbad055308dc3932f7797fc71684b60966
This commit is contained in:
1 parent
0167db6ef7
commit
e1270df8ea
1 file changed
+4
-2
+4
-2
@@ -1097,8 +1097,10 @@ int rdbSaveKeyValuePair(rio *rdb, robj_roptr key, robj_roptr val, const expireEn
|
||||
|
||||
char szT[32];
|
||||
#ifdef ENABLE_MVCC
|
||||
snprintf(szT, 32, "%" PRIu64, val->mvcc_tstamp);
|
||||
if (rdbSaveAuxFieldStrStr(rdb,"mvcc-tstamp", szT) == -1) return -1;
|
||||
if (g_pserver->fActiveReplica) {
|
||||
snprintf(szT, 32, "%" PRIu64, val->mvcc_tstamp);
|
||||
if (rdbSaveAuxFieldStrStr(rdb,"mvcc-tstamp", szT) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Save type, key, value */
|
||||
|
||||
Reference in new issue
Block a user