fix invalid data or checksum error

This commit is contained in:
obdev
2024-04-24 13:19:39 +00:00
committed by ob-robot
parent 471672c9f8
commit 2e0b6a4aca
2 changed files with 14 additions and 2 deletions

View File

@ -769,9 +769,9 @@ int LogColdCache::fill_cache_lines_(const int64_t flashback_version,
}
}
if (OB_SIZE_OVERFLOW == ret) {
if (OB_SIZE_OVERFLOW == ret || OB_ALLOCATE_MEMORY_FAILED == ret) {
ret = OB_SUCCESS;
PALF_LOG(TRACE, "LogCache size is up to limit, can't fill logs", K(flashback_version), K(fill_lsn), PRINT_INFO);
PALF_LOG(TRACE, "can't fill logs because of memory limit", K(flashback_version), K(fill_lsn), PRINT_INFO);
}
}

View File

@ -190,6 +190,18 @@ public:
IPalfEnvImpl *palf_env_impl,
LogStorage *log_storage);
void destroy();
// @brief: read logs from cold cache. If miss cold cache, read logs from the disk and fill cold cache
// @param[in] const int64_t flashback_version: flashback_version from LogStorage
// @param[in] const LSN &lsn: start lsn for read
// @param[in] const int64_t in_read_size: needed read size
// @param[out] ReadBuf &read_buf: buf for read logs
// @param[out] int64_t &out_read_size: actual read size
// @param[out] LogIteratorInfo *iterator_info: iterator info
// @return
// - OB_SUCCESS: read logs successfully
// - OB_INVALID_ARGUEMENTS: invalid arguments
// - OB_IO_ERROR: error when reading disk
// - other: bug
int read(const int64_t flashback_version,
const LSN &lsn,
const int64_t in_read_size,