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

Function updateChildInfo

src/childinfo.cpp:116–129  ·  view source on GitHub ↗

Update Child info. */

Source from the content-addressed store, hash-verified

114
115/* Update Child info. */
116void updateChildInfo(childInfoType information_type, size_t cow, monotime cow_updated, size_t keys, double progress) {
117 if (information_type == CHILD_INFO_TYPE_CURRENT_INFO) {
118 g_pserver->stat_current_cow_bytes = cow;
119 g_pserver->stat_current_cow_updated = cow_updated;
120 g_pserver->stat_current_save_keys_processed = keys;
121 if (progress != -1) g_pserver->stat_module_progress = progress;
122 } else if (information_type == CHILD_INFO_TYPE_AOF_COW_SIZE) {
123 g_pserver->stat_aof_cow_bytes = cow;
124 } else if (information_type == CHILD_INFO_TYPE_RDB_COW_SIZE) {
125 g_pserver->stat_rdb_cow_bytes = cow;
126 } else if (information_type == CHILD_INFO_TYPE_MODULE_COW_SIZE) {
127 g_pserver->stat_module_cow_bytes = cow;
128 }
129}
130
131/* Read child info data from the pipe.
132 * if complete data read into the buffer,

Callers 1

receiveChildInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected