MCPcopy Create free account
hub / github.com/Tencent/phxsql / SendEvent

Method SendEvent

phxbinlogsvr/core/agent/data_manager.cpp:49–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49int DataManager::SendEvent(const string &oldgtid, const string &newgtid, const string &event_buffer) {
50 STATISTICS(MySqlBinlogSend());
51 PhxTimer timer;
52 if (event_buffer.size() == 0) {
53 ColorLogWarning("send event value empty fail");
54 return BUFFER_FAIL;
55 }
56 int ret = event_agent_->SendValue(oldgtid, newgtid, event_buffer);
57 if (ret != OK) {
58 STATISTICS(MySqlBinlogSendFail());
59 ColorLogError("send value fail %d", ret);
60 }
61 STATISTICS(MySqlSendEventTime(timer.GetTime()));
62 return ret;
63}
64
65int DataManager::GetLastSendGTID(const string &uuid, string *gtid) {
66 STATISTICS(MySqlGetLastGTID());

Callers

nothing calls this directly

Calls 4

ColorLogWarningFunction · 0.85
ColorLogErrorFunction · 0.85
SendValueMethod · 0.80
GetTimeMethod · 0.80

Tested by

no test coverage detected