解决编译告警问题

This commit is contained in:
luozihao
2021-05-24 10:54:42 +08:00
parent 5be57ac19f
commit b440e0b89d
2 changed files with 1 additions and 5 deletions

View File

@ -2478,9 +2478,6 @@ static bool XLogArchiveCheckDone(const char *xlog)
static bool HasBeenArchivedOnHaMode(const char* xlog)
{
load_server_mode();
if (!t_thrd.xlog_cxt.server_mode == PRIMARY_MODE && !t_thrd.xlog_cxt.server_mode == STANDBY_MODE) {
return true;
}
int mode = t_thrd.xlog_cxt.server_mode;
XLogRecPtr minium_lsn = PG_UINT64_MAX;
for (int i = 0; mode == PRIMARY_MODE && i < g_instance.attr.attr_storage.max_wal_senders; i++) {

View File

@ -140,8 +140,6 @@ static void XLogWalRcvWrite(WalRcvCtlBlock *walrcb, char *buf, Size nbytes, XLog
* would otherwise have to reopen this file to fsync it later
*/
if (recvFile >= 0) {
char xlogfname[MAXFNAMELEN];
/*
* XLOG segment files will be re-read by recovery in startup
* process soon, so we don't advise the OS to release cache
@ -157,6 +155,7 @@ static void XLogWalRcvWrite(WalRcvCtlBlock *walrcb, char *buf, Size nbytes, XLog
* Create .done file forcibly to prevent the restored segment from
* being archived again later.
*/
char xlogfname[MAXFNAMELEN];
XLogFileName(xlogfname, recvFileTLI, recvSegNo);
XLogArchiveForceDone(xlogfname);
#endif