!4303 gs_probackup工具资源池化模式下页面校验

Merge pull request !4303 from 刘展峰/probackup
This commit is contained in:
opengauss_bot
2023-10-18 01:18:31 +00:00
committed by Gitee
2 changed files with 7 additions and 8 deletions

View File

@ -30,6 +30,7 @@
#include "lz4.h"
#include "zstd.h"
#include "storage/file/fio_device.h"
#include "storage/buf/bufmgr.h"
typedef struct PreReadBuf
{
@ -569,11 +570,7 @@ prepare_page(ConnectionArgs *conn_arg,
blknum, from_fullpath, read_len, BLCKSZ);
}
else
{
/* If it is in DSS mode, the validation is skipped */
if (IsDssMode())
return PageIsOk;
{
/* We have BLCKSZ of raw data, validate it */
rc = validate_one_page(page, absolute_blknum,
InvalidXLogRecPtr, page_st,
@ -1735,6 +1732,11 @@ validate_one_page(Page page, BlockNumber absolute_blkno,
XLogRecPtr stop_lsn, PageState *page_st,
uint32 checksum_version)
{
// if page is new page , skip validate
if (PageIsNew(page) && PageIsEmpty(page))
{
return PAGE_IS_VALID;
}
page_st->lsn = InvalidXLogRecPtr;
page_st->checksum = 0;

View File

@ -292,9 +292,6 @@ void check_crc(pgFile *file, char *file_fullpath, validate_files_arg *arguments)
* check page headers, checksums (if enabled)
* and compute checksum of the file
*/
if (IsDssMode()) {
return;
}
if (!validate_file_pages(file, file_fullpath, arguments->stop_lsn,
arguments->checksum_version,
arguments->backup_version,