enh: assert on alignment of idx entries in walWriteIndex

This commit is contained in:
Benguang Zhao 2022-10-18 02:12:05 +08:00
parent f0427c9322
commit af9aa9d783
1 changed files with 2 additions and 0 deletions

View File

@ -421,6 +421,8 @@ static int32_t walWriteIndex(SWal *pWal, int64_t ver, int64_t offset) {
terrno = TAOS_SYSTEM_ERROR(errno);
return -1;
}
ASSERT(taosLSeekFile(pWal->pIdxFile, 0, SEEK_END) == idxOffset + sizeof(SWalIdxEntry) && "Offset of idx entries misaligned");
return 0;
}