MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / get

Method get

tools/cdb2_sqlreplay/cdb2_sqlreplay.cpp:971–986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

969 return true;
970 }
971 cson_value *get() {
972 int64_t min_timestamp = LLONG_MAX;
973 int minix = -1;
974 for (int i = 0; i < sources.size(); i++) {
975 if (!sources[i].is_done()) {
976 if (sources[i].timestamp < min_timestamp) {
977 minix = i;
978 min_timestamp = sources[i].timestamp;
979 }
980 }
981 }
982 cson_value *ret = sources[minix].consume();
983 if (minix != -1)
984 sources[minix].get();
985 return ret;
986 }
987
988protected:
989 std::vector<event_source> sources;

Callers 15

tool_cdb2_printlog_mainFunction · 0.45
process_eventsFunction · 0.45
serialise_stringFunction · 0.45
serialise_fileFunction · 0.45
serialise_databaseFunction · 0.45
write_incremental_fileFunction · 0.45
LogHolderMethod · 0.45
release_logMethod · 0.45
recovery_optionsMethod · 0.45
RepopNewLrlMethod · 0.45
fromLongMethod · 0.45

Calls 2

is_doneMethod · 0.80
consumeMethod · 0.80

Tested by 7

fromLongMethod · 0.36
toLongWithTimezoneMethod · 0.36
toByteMethod · 0.36
remoteCommandMethod · 0.36
fixNetMethod · 0.36
breakNetMethod · 0.36
InsertTestMethod · 0.36