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

Function rdbLoadType

src/rdb.cpp:115–119  ·  view source on GitHub ↗

Load a "type" in RDB format, that is a one byte unsigned integer. * This function is not only used to load object types, but also special * "types" like the end-of-file type, the EXPIRE type, and so forth. */

Source from the content-addressed store, hash-verified

113 * This function is not only used to load object types, but also special
114 * "types" like the end-of-file type, the EXPIRE type, and so forth. */
115int rdbLoadType(rio *rdb) {
116 unsigned char type;
117 if (rioRead(rdb,&type,1) == 0) return -1;
118 return type;
119}
120
121/* This is only used to load old databases stored with the RDB_OPCODE_EXPIRETIME
122 * opcode. New versions of Redis store using the RDB_OPCODE_EXPIRETIME_MS

Callers 5

restoreCommandFunction · 0.85
rdbLoadObjectTypeFunction · 0.85
rdbLoadRioFunction · 0.85
deserializeStoredObjectFunction · 0.85
redis_check_rdbFunction · 0.85

Calls 1

rioReadFunction · 0.85

Tested by

no test coverage detected