mirror of
https://gitee.com/he3db/he3pg.git
synced 2024-11-29 18:58:35 +08:00
fix: mini consistent point problem
This commit is contained in:
commit
7e609e9938
@ -7993,30 +7993,24 @@ void pushTikv(int onePageListLen,int pageNum,bool flag)
|
||||
SortPageQueue();
|
||||
//wait shared queue data handler
|
||||
while(pageNum > CompletedTaskNum()) {
|
||||
usleep(10);
|
||||
pg_usleep(1000L);
|
||||
}
|
||||
cleanMap();
|
||||
start = end;
|
||||
PushPtr = GetXLogReplayRecPtr(NULL);
|
||||
PrePushPtr = PushPtr;
|
||||
if (ApplyLsn < PushPtr) {
|
||||
ApplyLsn = PushPtr;
|
||||
if (push_standby == true && XLogCtl->pushToDisk != PushPtr && !mpush) {
|
||||
InsertConsistToKV(PushPtr);
|
||||
}
|
||||
if (push_standby == true && XLogCtl->pushToDisk != ApplyLsn && !mpush) {
|
||||
InsertConsistToKV(ApplyLsn);
|
||||
}
|
||||
XLogCtl->pushToDisk = ApplyLsn;
|
||||
XLogCtl->pushToDisk = PushPtr;
|
||||
} else {
|
||||
if (flag == true) {
|
||||
PushPtr = GetXLogReplayRecPtr(NULL);
|
||||
PrePushPtr = PushPtr;
|
||||
if (ApplyLsn < PushPtr) {
|
||||
ApplyLsn = PushPtr;
|
||||
if (push_standby == true && XLogCtl->pushToDisk != PushPtr && !mpush) {
|
||||
InsertConsistToKV(PushPtr);
|
||||
}
|
||||
if (push_standby == true && XLogCtl->pushToDisk != ApplyLsn && !mpush) {
|
||||
InsertConsistToKV(ApplyLsn);
|
||||
}
|
||||
XLogCtl->pushToDisk = ApplyLsn;
|
||||
XLogCtl->pushToDisk = PushPtr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -764,13 +764,14 @@ restart:
|
||||
}
|
||||
//need to tell push standby has new standby add
|
||||
while(ApplyLsn != InvalidXLogRecPtr && RecPtr >= ApplyLsn) {
|
||||
XLogRecPtr tmpLsn = InvalidXLogRecPtr;
|
||||
XLogRecPtr tmpLsn = InvalidXLogRecPtr;
|
||||
if (!he3mirror) {
|
||||
tmpLsn = QueryMinLsn(InvalidXLogRecPtr);
|
||||
}
|
||||
if (tmpLsn !=InvalidXLogRecPtr) {
|
||||
pushTikv(0,hashMapSize(),true);
|
||||
if (tmpLsn <= RecPtr) {
|
||||
pg_usleep(200000);
|
||||
pg_usleep(10000);
|
||||
continue;
|
||||
} else {
|
||||
ApplyLsn = tmpLsn;
|
||||
@ -1126,11 +1127,12 @@ restart:
|
||||
}
|
||||
//need to tell push standby has new standby add
|
||||
while(ApplyLsn != InvalidXLogRecPtr && RecPtr >= ApplyLsn) {
|
||||
XLogRecPtr tmpLsn = InvalidXLogRecPtr;
|
||||
XLogRecPtr tmpLsn = InvalidXLogRecPtr;
|
||||
if (!he3mirror) {
|
||||
tmpLsn = QueryMinLsn(InvalidXLogRecPtr);
|
||||
}
|
||||
if (tmpLsn !=InvalidXLogRecPtr) {
|
||||
pushTikv(0,hashMapSize(),true);
|
||||
if (tmpLsn <= RecPtr) {
|
||||
pg_usleep(10000);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user