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

Function rioWriteBulkStreamID

src/aof.cpp:1335–1342  ·  view source on GitHub ↗

Helper for rewriteStreamObject() that generates a bulk string into the * AOF representing the ID 'id'. */

Source from the content-addressed store, hash-verified

1333/* Helper for rewriteStreamObject() that generates a bulk string into the
1334 * AOF representing the ID 'id'. */
1335int rioWriteBulkStreamID(rio *r,streamID *id) {
1336 int retval;
1337
1338 sds replyid = sdscatfmt(sdsempty(),"%U-%U",id->ms,id->seq);
1339 retval = rioWriteBulkString(r,replyid,sdslen(replyid));
1340 sdsfree(replyid);
1341 return retval;
1342}
1343
1344/* Helper for rewriteStreamObject(): emit the XCLAIM needed in order to
1345 * add the message described by 'nack' having the id 'rawid', into the pending

Callers 2

rewriteStreamObjectFunction · 0.85

Calls 5

sdscatfmtFunction · 0.85
sdsemptyFunction · 0.85
rioWriteBulkStringFunction · 0.85
sdslenFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected