diff --git a/source/dnode/vnode/src/meta/metaEntry2.c b/source/dnode/vnode/src/meta/metaEntry2.c new file mode 100644 index 0000000000..dbdc10a94a --- /dev/null +++ b/source/dnode/vnode/src/meta/metaEntry2.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2023 Hongze Cheng . + * All rights reserved. + * + * This code is the intellectual property of Hongze Cheng. + * Any reproduction or distribution, in whole or in part, + * without the express written permission of Hongze Cheng is + * strictly prohibited. + */ + +#include "meta.h" + +#define metaErrLog(ERRNO) metaError("%s failed at %s:%d since %s", __func__, __FILE__, __LINE__, tstrerror(ERRNO)); + +static int32_t metaHandleEntryDrop(SMeta *pMeta, const SMetaEntry *pEntry) { + int32_t code = TSDB_CODE_SUCCESS; + + // TODO + + return code; +} + +static int32_t metaHandleEntryUpsert(SMeta *pMeta, const SMetaEntry *pEntry) { + int32_t code = TSDB_CODE_SUCCESS; + + // TODO + + return code; +} + +int32_t metaHandleEntry2(SMeta *pMeta, const SMetaEntry *pEntry) { + int32_t code = TSDB_CODE_SUCCESS; + + if (pMeta == NULL || pEntry == NULL) { + metaErrLog(TSDB_CODE_INVALID_PARA); + return TSDB_CODE_INVALID_PARA; + } + + if (pEntry->type < 0) { + code = metaHandleEntryDrop(pMeta, pEntry); + } else { + code = metaHandleEntryUpsert(pMeta, pEntry); + } + return code; + ; +} \ No newline at end of file