mirror of
https://gitee.com/he3db/he3pg.git
synced 2024-12-02 04:07:34 +08:00
fix existing overlap when pushtandby parallel read wals
Signed-off-by: shipixian <shipixian_yewu@cmss.chinamobile.com>
This commit is contained in:
parent
fbd917a716
commit
0d4f1d9fce
@ -14328,7 +14328,7 @@ retry:
|
||||
if (EnableHotStandby && !push_standby)
|
||||
walStoreToLocal = true;
|
||||
|
||||
r = batchRead((uint8_t *) readBuf, ControlFile->checkPointCopy.ThisTimeLineID, targetOff,targetOff+8192,walStoreToLocal);
|
||||
r = batchRead((uint8_t *) readBuf, ControlFile->checkPointCopy.ThisTimeLineID, targetOff,targetOff+16384,walStoreToLocal);
|
||||
pgstat_report_wait_end();
|
||||
|
||||
/*
|
||||
@ -14483,7 +14483,11 @@ producerXLogParallelBatchRead(XLogReaderState *xlogreader, XLogRecPtr startPtr,
|
||||
for(;start < end;start += tlen) {
|
||||
wal_batch_t walElem;
|
||||
walElem.startLsn = start;
|
||||
walElem.endLsn = start + tlen;
|
||||
// walElem.endLsn = start + tlen;
|
||||
if (start + tlen <= end)
|
||||
walElem.endLsn = start + tlen;
|
||||
else
|
||||
walElem.endLsn = end;
|
||||
wal_batch_t *curElem = NULL;
|
||||
while((curElem = ring_buffer_queue(gRingBufferManger,walElem)) == NULL) {
|
||||
usleep(10);
|
||||
|
@ -1431,7 +1431,7 @@ He3DBWALRead(XLogReaderState *state,
|
||||
pgstat_report_wait_start(WAIT_EVENT_WAL_READ);
|
||||
#endif
|
||||
|
||||
nbytes = batchRead((uint8_t *) buf, state->currTLI, startptr, false);
|
||||
nbytes = batchRead((uint8_t *) buf, state->currTLI, startptr, startptr+16384, false);
|
||||
|
||||
#ifndef FRONTEND
|
||||
pgstat_report_wait_end();
|
||||
|
Loading…
Reference in New Issue
Block a user