@@ -533,7 +533,6 @@ void DiskTable::GcTTL() {
533533 PDLOG (WARNING, " Manual Compaction failed" );
534534 }
535535 }
536- PDLOG (ERROR, " Manual Compaction Finished" );
537536}
538537
539538void DiskTable::GcTTLOrHead () {}
@@ -1196,28 +1195,11 @@ bool DiskTable::DeleteIndex(const std::string& idx_name) {
11961195
11971196uint64_t DiskTable::GetRecordIdxCnt () {
11981197 auto inner_indexs = table_index_.GetAllInnerIndex ();
1199- rocksdb::ReadOptions ro = rocksdb::ReadOptions ();
1200- const rocksdb::Snapshot* snapshot = db_->GetSnapshot ();
1201-
1202- // for (size_t i = 0; i < inner_indexs->size(); i++) {
1203- // bool is_valid = false;
1204- // for (const auto& index_def : inner_indexs->at(i)->GetIndex()) {
1205- // if (index_def && index_def->IsReady()) {
1206- // rocksdb::Iterator* it = db_->NewIterator(ro, cf_hs_[i + 1]);
1207-
1208- // for (; it->Valid(); it->Next()) {
1209- // uint32_t cur_ts_idx = UINT32_MAX;
1210- // std::string cur_pk;
1211- // uint64_t cur_ts;
1212-
1213- // ParseKeyAndTs(has_ts_idx, it->key(), cur_pk, cur_ts, cur_ts_idx);
1214- // }
1215- // }
1216- // }
1217-
1218- // }
1219- // TODO(litongxin)
1220- return 0 ;
1198+ uint64_t count = 0 ;
1199+ for (const auto & inner_index : *inner_indexs) {
1200+ count += idx_cnt_vec_[inner_index->GetIndex ().front ()->GetId ()]->load (std::memory_order_relaxed);
1201+ }
1202+ return count;
12211203}
12221204
12231205bool DiskTable::GetRecordIdxCnt (uint32_t idx, uint64_t ** stat, uint32_t * size) {
0 commit comments