| 99 | } |
| 100 | |
| 101 | int EventUUIDHandler::LoadUUIDInfo() { |
| 102 | int ret = FILE_FAIL; |
| 103 | if (newest_info_.file_name().empty()) { |
| 104 | ColorLogInfo("%s no data, open old file", __func__); |
| 105 | ret = event_file_manager_->OpenOldestFile(); |
| 106 | } else { |
| 107 | ColorLogInfo("%s open file %s, set offset %d", __func__, newest_info_.file_name().c_str(), |
| 108 | newest_info_.offset()); |
| 109 | ret = event_file_manager_->SetReadPos(newest_info_); |
| 110 | } |
| 111 | ColorLogInfo("%s newest info gtid %s instance_id %llu ret %d", __func__, newest_info_.gtid().c_str(), |
| 112 | newest_info_.instance_id(), ret); |
| 113 | while (true) { |
| 114 | EventDataInfo data_info; |
| 115 | EventData event_data; |
| 116 | int ret = event_file_manager_->ReadData(&event_data, &data_info); |
| 117 | if (ret == DATA_EMPTY) { |
| 118 | return OK; |
| 119 | } else if (ret == OK) { |
| 120 | ret = UpdateEventUUIDInfoByGTID(event_data.gtid(), data_info); |
| 121 | } |
| 122 | if (ret) { |
| 123 | return ret; |
| 124 | } |
| 125 | } |
| 126 | return FILE_FAIL; |
| 127 | } |
| 128 | |
| 129 | int EventUUIDHandler::ParseFromEventInfoList(const EventDataInfoList &info) { |
| 130 | map_uuid_.clear(); |
nothing calls this directly
no test coverage detected