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

Function getClientReplicationBacklogSharedUsage

src/networking.cpp:3802–3804  ·  view source on GitHub ↗

In the case of a replica client, writes to said replica are using data from the replication backlog * as opposed to it's own internal buffer, this number should keep track of that */

Source from the content-addressed store, hash-verified

3800/* In the case of a replica client, writes to said replica are using data from the replication backlog
3801 * as opposed to it's own internal buffer, this number should keep track of that */
3802unsigned long getClientReplicationBacklogSharedUsage(client *c) {
3803 return (!(c->flags & CLIENT_SLAVE) || !c->FPendingReplicaWrite() ) ? 0 : g_pserver->master_repl_offset - c->repl_curr_off;
3804}
3805
3806/* This function returns the number of bytes that Redis is
3807 * using to store the reply still not read by the client.

Callers 2

Calls 1

FPendingReplicaWriteMethod · 0.80

Tested by

no test coverage detected