提交 0304ad88 编写于 作者: Y yihaoDeng

fix invalid cmp

上级 fdd62e53
...@@ -544,16 +544,16 @@ void streamBackendCleanup(void* arg) { ...@@ -544,16 +544,16 @@ void streamBackendCleanup(void* arg) {
taosHashCleanup(pHandle->cfInst); taosHashCleanup(pHandle->cfInst);
if (pHandle->db) { if (pHandle->db) {
char* err = NULL; // char* err = NULL;
rocksdb_flushoptions_t* flushOpt = rocksdb_flushoptions_create(); // rocksdb_flushoptions_t* flushOpt = rocksdb_flushoptions_create();
rocksdb_flushoptions_set_wait(flushOpt, 1); // rocksdb_flushoptions_set_wait(flushOpt, 1);
rocksdb_flush(pHandle->db, flushOpt, &err); // rocksdb_flush(pHandle->db, flushOpt, &err);
if (err != NULL) { // if (err != NULL) {
qError("failed to flush db before streamBackend clean up, reason:%s", err); // qError("failed to flush db before streamBackend clean up, reason:%s", err);
taosMemoryFree(err); // taosMemoryFree(err);
} // }
rocksdb_flushoptions_destroy(flushOpt); // rocksdb_flushoptions_destroy(flushOpt);
rocksdb_close(pHandle->db); rocksdb_close(pHandle->db);
} }
rocksdb_options_destroy(pHandle->dbOpt); rocksdb_options_destroy(pHandle->dbOpt);
...@@ -617,6 +617,7 @@ void streamBackendHandleCleanup(void* arg) { ...@@ -617,6 +617,7 @@ void streamBackendHandleCleanup(void* arg) {
} }
} }
taosMemoryFreeClear(wrapper->pHandle); taosMemoryFreeClear(wrapper->pHandle);
for (int i = 0; i < cfLen; i++) { for (int i = 0; i < cfLen; i++) {
rocksdb_options_destroy(wrapper->cfOpts[i]); rocksdb_options_destroy(wrapper->cfOpts[i]);
rocksdb_block_based_options_destroy(((RocksdbCfParam*)wrapper->param)[i].tableOpt); rocksdb_block_based_options_destroy(((RocksdbCfParam*)wrapper->param)[i].tableOpt);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册