Merge pull request #1974 from zhangch5n/master

not to printf the log when record type is None
pull/1981/head^2
mergify[bot] 2020-04-18 11:49:07 +00:00 committed by GitHub
commit 06335ad80b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}