Merge pull request #29499 from taosdata/fix/TS-5872-3.0
fix: meta entry snapshot problem for old version
This commit is contained in:
commit
3bcf7c645f
|
@ -61,6 +61,7 @@ static FORCE_INLINE tb_uid_t metaGenerateUid(SMeta* pMeta) { return tGenIdPI64()
|
||||||
|
|
||||||
// metaTable ==================
|
// metaTable ==================
|
||||||
int32_t metaHandleEntry2(SMeta* pMeta, const SMetaEntry* pEntry);
|
int32_t metaHandleEntry2(SMeta* pMeta, const SMetaEntry* pEntry);
|
||||||
|
void metaHandleSyncEntry(SMeta* pMeta, const SMetaEntry* pEntry);
|
||||||
|
|
||||||
// metaCache ==================
|
// metaCache ==================
|
||||||
int32_t metaCacheOpen(SMeta* pMeta);
|
int32_t metaCacheOpen(SMeta* pMeta);
|
||||||
|
|
|
@ -1915,3 +1915,12 @@ int32_t metaHandleEntry2(SMeta *pMeta, const SMetaEntry *pEntry) {
|
||||||
}
|
}
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void metaHandleSyncEntry(SMeta *pMeta, const SMetaEntry *pEntry) {
|
||||||
|
int32_t code = TSDB_CODE_SUCCESS;
|
||||||
|
code = metaHandleEntry2(pMeta, pEntry);
|
||||||
|
if (code) {
|
||||||
|
metaErr(TD_VID(pMeta->pVnode), code);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
|
@ -197,8 +197,7 @@ int32_t metaSnapWrite(SMetaSnapWriter* pWriter, uint8_t* pData, uint32_t nData)
|
||||||
code = metaDecodeEntry(pDecoder, &metaEntry);
|
code = metaDecodeEntry(pDecoder, &metaEntry);
|
||||||
TSDB_CHECK_CODE(code, lino, _exit);
|
TSDB_CHECK_CODE(code, lino, _exit);
|
||||||
|
|
||||||
code = metaHandleEntry2(pMeta, &metaEntry);
|
metaHandleSyncEntry(pMeta, &metaEntry);
|
||||||
TSDB_CHECK_CODE(code, lino, _exit);
|
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
if (code) {
|
if (code) {
|
||||||
|
|
Loading…
Reference in New Issue