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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2022a8ab322 [fix](invert index) fix reader does not close fd (#27918)
2022a8ab322 is described below

commit 2022a8ab322d2fcb41389ddfda6764dc2dc6e17c
Author: zzzxl <[email protected]>
AuthorDate: Mon Dec 4 16:44:50 2023 +0800

    [fix](invert index) fix reader does not close fd (#27918)
---
 be/src/olap/compaction.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index b889a0fe70c..a6ad5f6ee52 100644
--- a/be/src/olap/compaction.cpp
+++ b/be/src/olap/compaction.cpp
@@ -604,9 +604,10 @@ Status 
Compaction::construct_output_rowset_writer(RowsetWriterContext& ctx, bool
                                 std::string file_str = p.filename().string();
                                 lucene::store::Directory* dir =
                                         
DorisCompoundDirectory::getDirectory(fs, dir_str.c_str());
-                                auto reader = new DorisCompoundReader(dir, 
file_str.c_str());
+                                DorisCompoundReader reader(dir, 
file_str.c_str());
                                 std::vector<std::string> files;
-                                reader->list(&files);
+                                reader.list(&files);
+                                reader.close();
 
                                 // why is 3?
                                 // bkd index will write at least 3 files


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

Reply via email to