This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 06a2182d891 [fix](build index)Only get file size for inverted index 
(#39966)
06a2182d891 is described below

commit 06a2182d89165a9ede2315b12e05eab382702096
Author: qiye <[email protected]>
AuthorDate: Tue Aug 27 15:30:51 2024 +0800

    [fix](build index)Only get file size for inverted index (#39966)
    
    ## Proposed changes
    
    Fix `NOT FOUND` index file error message in logs.
    bp #39965
---
 be/src/olap/rowset/beta_rowset.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/be/src/olap/rowset/beta_rowset.cpp 
b/be/src/olap/rowset/beta_rowset.cpp
index 6e0c854ae2c..b38649c8db6 100644
--- a/be/src/olap/rowset/beta_rowset.cpp
+++ b/be/src/olap/rowset/beta_rowset.cpp
@@ -103,6 +103,10 @@ Status BetaRowset::get_inverted_index_size(size_t* 
index_size) {
     if (_schema->get_inverted_index_storage_format() == 
InvertedIndexStorageFormatPB::V1) {
         auto indices = _schema->indexes();
         for (auto& index : indices) {
+            // only get file_size for inverted index
+            if (index.index_type() != IndexType::INVERTED) {
+                continue;
+            }
             for (int seg_id = 0; seg_id < num_segments(); ++seg_id) {
                 auto seg_path = segment_file_path(seg_id);
                 int64_t file_size = 0;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to