Conversation
src/algorithm/hgraph.cpp
Outdated
| dists[j] = search_result.top().first; | ||
| ids[j] = this->label_table_->GetLabelById(search_result.top().second); | ||
| if (extra_infos != nullptr) { | ||
| this->extra_infos_->GetExtraInfoById(search_result.top().second, tmp_extra_info.get()); |
src/algorithm/hgraph.cpp
Outdated
| dists[j] = search_result.top().first; | ||
| ids[j] = this->label_table_->GetLabelById(search_result.top().second); | ||
| if (extra_infos != nullptr) { | ||
| this->extra_infos_->GetExtraInfoById(search_result.top().second, tmp_extra_info.get()); |
There was a problem hiding this comment.
why not pass the extra_infos directly?
src/algorithm/hgraph.cpp
Outdated
| estimate_memory += block_memory_ceil(precise_memory, block_size); | ||
| } | ||
|
|
||
| if (extra_info_size_ > 0 && this->extra_infos_->InMemory()) { |
There was a problem hiding this comment.
It is best to use whether this->extra_infos_ is nullptr as the condition to avoid core dumps.
| this->io_->Deserialize(reader); | ||
| } | ||
|
|
||
| } // namespace vsag No newline at end of file |
0a12a07 to
c33253b
Compare
a7a58f5 to
fd4fc30
Compare
src/data_cell/extra_info_interface.h
Outdated
|
|
||
| public: | ||
| InnerIdType total_count_{0}; | ||
| InnerIdType max_capacity_{1000000}; |
There was a problem hiding this comment.
why init the capacity as 1000000
There was a problem hiding this comment.
Refer to the setting of FlattenDataCell, modify it to 800
tests/test_hgraph.cpp
Outdated
| vsag::Options::Instance().set_block_size_limit(origin_size); | ||
| } | ||
| } | ||
| } No newline at end of file |
src/data_cell/extra_info_datacell.h
Outdated
| } | ||
|
|
||
| public: | ||
| std::shared_ptr<BasicIO<MemoryBlockIO>> io_{nullptr}; |
There was a problem hiding this comment.
Hardcoding the MemoryBlockIO in this part might not be the best design, as it would raise challenges for subsequent expansion of disk-based extroinfo. It is recommended to employ template, similar to how other data_cell implementations work, to resolve this issue.
There was a problem hiding this comment.
As discussed earlier, Extra Info considers only the MemoryBlockIO type currently.
But we can reserve interfaces for other types by raising a std::invaliargument exception on initialization for types other than MemoryBlockIO.
6501119 to
1be97eb
Compare
Codecov ReportAttention: Patch coverage is @@ Coverage Diff @@
## main #486 +/- ##
==========================================
- Coverage 90.66% 90.61% -0.05%
==========================================
Files 177 182 +5
Lines 10846 11030 +184
==========================================
+ Hits 9833 9995 +162
- Misses 1013 1035 +22
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
885ec7b to
08f7182
Compare
eb50e07 to
35553db
Compare
35553db to
4eb7b02
Compare
Signed-off-by: lyxiong0 <bear507@163.com>
ce46b4d to
60e4a73
Compare
Signed-off-by: lyxiong0 <bear507@163.com>
60e4a73 to
69df18b
Compare
ExtraInfoDataCellextra_info_sizeKnnSearch,Addetc.related to issue #277