This commit is contained in:
zoujia 2023-05-19 15:57:58 +08:00
parent 83ba25ac3d
commit cc872c74e4

View File

@ -3814,17 +3814,17 @@ mustflush:
int bRelativeOffset = 0;
int eRelativeOffset = 0;
SpinLockAcquire(&XLogCtl->info_lck);
XLogParralFlush flushInfo = XLogCtl->LogFlush;
SpinLockRelease(&XLogCtl->info_lck);
// SpinLockAcquire(&XLogCtl->info_lck);
// XLogParralFlush flushInfo = XLogCtl->LogFlush;
// SpinLockRelease(&XLogCtl->info_lck);
// printf("end flush wals, begin %d, curLoc %d, WriteRqst.Write %ld\n", flushInfo.begin, curLoc, WriteRqst.Write);
while (flushInfo.begin < curLoc)
while (XlogCtl.LogFlush.begin < curLoc)
{
pg_usleep(20L);
SpinLockAcquire(&XLogCtl->info_lck);
flushInfo = XLogCtl->LogFlush;
SpinLockRelease(&XLogCtl->info_lck);
// SpinLockAcquire(&XLogCtl->info_lck);
// flushInfo = XLogCtl->LogFlush;
// SpinLockRelease(&XLogCtl->info_lck);
}
/*