| 1238 | } |
| 1239 | |
| 1240 | int saveKey(rio *rdb, int flags, size_t *processed, const char *keystr, robj_roptr o) |
| 1241 | { |
| 1242 | redisObjectStack key; |
| 1243 | |
| 1244 | initStaticStringObject(key,(char*)keystr); |
| 1245 | const expireEntry *pexpire = nullptr; |
| 1246 | if (o->FExpires()) { |
| 1247 | pexpire = &o->expire; |
| 1248 | } |
| 1249 | |
| 1250 | if (rdbSaveKeyValuePair(rdb,&key,o,pexpire) == -1) |
| 1251 | return 0; |
| 1252 | |
| 1253 | /* When this RDB is produced as part of an AOF rewrite, move |
| 1254 | * accumulated diff from parent to child while rewriting in |
| 1255 | * order to have a smaller final write. */ |
| 1256 | if (flags & RDBFLAGS_AOF_PREAMBLE && |
| 1257 | rdb->processed_bytes > *processed+AOF_READ_DIFF_INTERVAL_BYTES) |
| 1258 | { |
| 1259 | *processed = rdb->processed_bytes; |
| 1260 | aofReadDiffFromParent(); |
| 1261 | } |
| 1262 | return 1; |
| 1263 | } |
| 1264 | |
| 1265 | ssize_t rdbSaveSingleModuleAux(rio *rdb, int when, moduleType *mt) { |
| 1266 | /* Save a module-specific aux value. */ |
no test coverage detected