diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index 6c284815f917010280eef4d31b754631463d2fc8..de2aee6dcc937edab10acf148d9c1908136d87ec 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -605,6 +605,12 @@ static int32_t mndProcessCreateTopicReq(SRpcMsg *pReq) { goto _OVER; } + if (pDb->cfg.walRetentionPeriod == 0) { + terrno = TSDB_CODE_MND_INVALID_DB_OPTION; + mError("db:%s, not allowed to create topic when WAL_RETENTION_PERIOD is zero", pDb->name); + goto _OVER; + } + code = mndCreateTopic(pMnode, pReq, &createTopicReq, pDb, pReq->info.conn.user); if (code == 0) { code = TSDB_CODE_ACTION_IN_PROGRESS;