airborne12 commented on code in PR #44205:
URL: https://github.com/apache/doris/pull/44205#discussion_r1851264642


##########
be/src/olap/rowset/segment_v2/inverted_index_writer.cpp:
##########
@@ -656,36 +645,31 @@ class InvertedIndexColumnWriterImpl : public 
InvertedIndexColumnWriter {
                                 << "Inverted index writer create output error 
occurred: nullptr";
                         _CLTHROWA(CL_ERR_IO, "Create output error with 
nullptr");
                     }
-                    meta_out->close();
-                    data_out->close();
-                    index_out->close();
-                    _dir->close();
                 } else if constexpr (field_is_slice_type(field_type)) {
                     null_bitmap_out = std::unique_ptr<
                             lucene::store::IndexOutput>(_dir->createOutput(
                             
InvertedIndexDescriptor::get_temporary_null_bitmap_file_name()));
                     write_null_bitmap(null_bitmap_out.get());
-                    close();
                     DBUG_EXECUTE_IF(
                             
"InvertedIndexWriter._throw_clucene_error_in_fulltext_writer_close", {
                                 _CLTHROWA(CL_ERR_IO,
                                           "debug point: test throw error in 
fulltext index writer");
                             });
                 }
             } catch (CLuceneError& e) {
-                FINALLY_CLOSE_OUTPUT(null_bitmap_out)
-                FINALLY_CLOSE_OUTPUT(meta_out)
-                FINALLY_CLOSE_OUTPUT(data_out)
-                FINALLY_CLOSE_OUTPUT(index_out)
-                if constexpr (field_is_numeric_type(field_type)) {
-                    FINALLY_CLOSE_OUTPUT(_dir)
-                } else if constexpr (field_is_slice_type(field_type)) {
-                    FINALLY_CLOSE_OUTPUT(_index_writer);
-                }
-                LOG(WARNING) << "Inverted index writer finish error occurred: 
" << e.what();
-                return 
Status::Error<doris::ErrorCode::INVERTED_INDEX_CLUCENE_ERROR>(
-                        "Inverted index writer finish error occurred:{}", 
e.what());
+                error_context.eptr = std::current_exception();

Review Comment:
   Is there any need for catching after refactoring?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to