not to printf the log when record type is None

Signed-off-by: zhangchen <zhangch5n@163.com>
This commit is contained in:
zhangchen 2020-04-18 16:38:38 +08:00
parent 375fd709a9
commit b02a37d79d
2 changed files with 6 additions and 3 deletions

View File

@ -29,7 +29,7 @@ using TableMetaPtr = std::shared_ptr<std::unordered_map<std::string, TableSchema
#define UNIT_MB (1024 * 1024)
#define LSN_OFFSET_MASK 0x00000000ffffffff
enum class MXLogType { InsertBinary, InsertVector, Delete, Update, Flush, None, Entity };
enum class MXLogType { None, InsertBinary, InsertVector, Delete, Update, Flush, Entity };
struct MXLogRecord {
uint64_t lsn;

View File

@ -148,8 +148,11 @@ WalManager::GetNextRecovery(MXLogRecord& record) {
}
}
LOG_WAL_INFO_ << "record type " << (int32_t)record.type << " record lsn " << record.lsn << " error code "
<< error_code;
// print the log only when record.type != MXLogType::None
if (record.type != MXLogType::None) {
LOG_WAL_INFO_ << "record type " << (int32_t)record.type << " record lsn " << record.lsn << " error code "
<< error_code;
}
return error_code;
}