branch-2.1: [Fix](memory) Add try catch block for Segment::load_pk_index_and_bf… (#47742)
pick https://github.com/apache/doris/pull/47715
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "common/exception.h"
|
||||
#include "common/logging.h"
|
||||
#include "common/status.h"
|
||||
#include "io/fs/file_reader.h"
|
||||
@ -327,8 +328,13 @@ Status Segment::_load_pk_bloom_filter() {
|
||||
}
|
||||
|
||||
Status Segment::load_pk_index_and_bf() {
|
||||
RETURN_IF_ERROR(load_index());
|
||||
RETURN_IF_ERROR(_load_pk_bloom_filter());
|
||||
// `DorisCallOnce` may catch exception in calling stack A and re-throw it in
|
||||
// a different calling stack B which doesn't have catch block. So we add catch block here
|
||||
// to prevent coreudmp
|
||||
RETURN_IF_CATCH_EXCEPTION({
|
||||
RETURN_IF_ERROR(load_index());
|
||||
RETURN_IF_ERROR(_load_pk_bloom_filter());
|
||||
});
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user