fix(stream):adjust current offset by using the scanning version, not the processed version in WAL.

This commit is contained in:
Haojun Liao 2024-03-18 09:12:53 +08:00
parent 15e65d5f07
commit 6763ac9110
1 changed files with 5 additions and 1 deletions

View File

@ -1128,7 +1128,11 @@ static int32_t metaHeartbeatToMnodeImpl(SStreamMeta* pMeta) {
}
if ((*pTask)->exec.pWalReader != NULL) {
entry.processedVer = (*pTask)->chkInfo.nextProcessVer - 1;
entry.processedVer = walReaderGetCurrentVer((*pTask)->exec.pWalReader) - 1;
if (entry.processedVer < 0) {
entry.processedVer = (*pTask)->chkInfo.processedVer;
}
walReaderValidVersionRange((*pTask)->exec.pWalReader, &entry.verStart, &entry.verEnd);
}