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

Function rdbSavedObjectLen

src/rdb.cpp:1124–1128  ·  view source on GitHub ↗

Return the length the object will have on disk if saved with * the rdbSaveObject() function. Currently we use a trick to get * this length with very little changes to the code. In the future * we could switch to a faster solution. */

Source from the content-addressed store, hash-verified

1122 * this length with very little changes to the code. In the future
1123 * we could switch to a faster solution. */
1124size_t rdbSavedObjectLen(robj *o, robj *key) {
1125 ssize_t len = rdbSaveObject(NULL,o,key);
1126 serverAssertWithInfo(NULL,o,len != -1);
1127 return len;
1128}
1129
1130/* Save a key-value pair, with expire time, type, key, value.
1131 * On error -1 is returned.

Callers 1

debugCommandFunction · 0.85

Calls 1

rdbSaveObjectFunction · 0.85

Tested by

no test coverage detected