slave replay

Code Source From: Self Code
Description:  【Optional】
Jira:  #【Optional】
市场项目编号(名称):【Optional】
This commit is contained in:
shenzhengntu 2023-03-24 14:53:32 +08:00
parent ddcb255c66
commit aa7827ae8f
2 changed files with 6 additions and 4 deletions

View File

@ -446,10 +446,9 @@ CleanLogIndexMain(int argc, char *argv[])
}
}
}
if (pushStandbyPrePoint < LastPushPoint) {
pushStandbyPoint = GetConsistLsn(LastPushPoint);
if (pushStandbyPrePoint < PrevPushPoint) {
pushStandbyPoint = GetConsistLsn(PrevPushPoint);
}
}
}
}

View File

@ -8,12 +8,15 @@ GThreadPool *gpool = NULL;
static __thread GError *gerr = NULL;
static bool IsInitPool = false;
static void getWalFunc(gpointer data, gpointer user_data) {
bool walStoreToLocal = false;
if (EnableHotStandby && !push_standby)
walStoreToLocal = true;
wal_batch_t* elem = (wal_batch_t*)data;
if (elem != NULL) {
//elem->status = STARTSTATUS;
int r;
clock_t start = clock();
r = batchRead((uint8_t *) elem->data, ThisTimeLineID, elem->startLsn);
r = batchRead((uint8_t *) elem->data, ThisTimeLineID, elem->startLsn, walStoreToLocal);
clock_t end = clock();
printf("====LSN %X/%X==pid %d==len %d===time %u\n",LSN_FORMAT_ARGS(elem->startLsn),pthread_self(),r,end-start);
elem->dataLen = r;