enh: check snapshot begin index for unexpected change in syncNodeOnSnapshotBegin
This commit is contained in:
parent
7b967ffdc6
commit
0e6ea7af71
|
@ -806,6 +806,13 @@ static int32_t syncNodeOnSnapshotBegin(SSyncNode *pSyncNode, SyncSnapshotSend *p
|
||||||
goto _SEND_REPLY;
|
goto _SEND_REPLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SyncIndex beginIndex = syncNodeGetSnapBeginIndex(pSyncNode);
|
||||||
|
if (pReceiver->snapshotParam.start != beginIndex) {
|
||||||
|
sRError(pReceiver, "snapshot begin index is changed unexpectedly. sver:%" PRId64 ", beginIndex:%" PRId64,
|
||||||
|
pReceiver->snapshotParam.start, beginIndex);
|
||||||
|
goto _SEND_REPLY;
|
||||||
|
}
|
||||||
|
|
||||||
code = 0;
|
code = 0;
|
||||||
_SEND_REPLY:
|
_SEND_REPLY:
|
||||||
if (code != 0 && terrno != 0) {
|
if (code != 0 && terrno != 0) {
|
||||||
|
|
Loading…
Reference in New Issue