Add debug for get_binlog_pmc.

This commit is contained in:
levlam 2022-10-22 00:38:04 +03:00
parent 72b258e78e
commit b788518f22
2 changed files with 5 additions and 3 deletions

View File

@ -163,8 +163,8 @@ std::shared_ptr<KeyValueSyncInterface> TdDb::get_config_pmc_shared() {
return config_pmc_;
}
KeyValueSyncInterface *TdDb::get_binlog_pmc() {
CHECK(binlog_pmc_);
KeyValueSyncInterface *TdDb::get_binlog_pmc_impl(const char *file, int line) {
LOG_CHECK(binlog_pmc_) << G()->close_flag() << ' ' << file << ' ' << line;
return binlog_pmc_.get();
}

View File

@ -76,7 +76,9 @@ class TdDb {
std::shared_ptr<KeyValueSyncInterface> get_binlog_pmc_shared();
std::shared_ptr<KeyValueSyncInterface> get_config_pmc_shared();
KeyValueSyncInterface *get_binlog_pmc();
#define get_binlog_pmc() get_binlog_pmc_impl(__FILE__, __LINE__)
KeyValueSyncInterface *get_binlog_pmc_impl(const char *file, int line);
KeyValueSyncInterface *get_config_pmc();
SqliteKeyValue *get_sqlite_sync_pmc();