platoneko commented on code in PR #31716: URL: https://github.com/apache/doris/pull/31716#discussion_r1524357299
########## be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp: ########## @@ -512,11 +511,7 @@ void DorisCompoundDirectory::FSIndexOutput::close() { int64_t DorisCompoundDirectory::FSIndexOutput::length() const { CND_PRECONDITION(_writer != nullptr, "file is not open"); - int64_t ret; - if (!_writer->fs()->file_size(_writer->path(), &ret).ok()) { - return -1; - } - return ret; + return _writer->bytes_appended(); Review Comment: Seems that there is no code within clucene that checks if the return value of `length` is -1. -- 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