Update Child info. */
| 114 | |
| 115 | /* Update Child info. */ |
| 116 | void 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, |