Compute the corresponding index from a replication backlog offset * Since this computation needs the size of the replication backlog, * you need to have the repl_backlog_lock in order to call it */
| 250 | * Since this computation needs the size of the replication backlog, |
| 251 | * you need to have the repl_backlog_lock in order to call it */ |
| 252 | long long getReplIndexFromOffset(long long offset){ |
| 253 | serverAssert(g_pserver->repl_backlog_lock.fOwnLock()); |
| 254 | long long index = (offset - g_pserver->repl_backlog_start) % g_pserver->repl_backlog_size; |
| 255 | return index; |
| 256 | } |
| 257 | |
| 258 | /* This function is called when the user modifies the replication backlog |
| 259 | * size at runtime. It is up to the function to both update the |
no test coverage detected