diff --git a/src/observer/table_load/ob_table_load_error_row_handler.h b/src/observer/table_load/ob_table_load_error_row_handler.h index 1ed3ca3f26..2939bfb568 100644 --- a/src/observer/table_load/ob_table_load_error_row_handler.h +++ b/src/observer/table_load/ob_table_load_error_row_handler.h @@ -38,6 +38,7 @@ public: int check_rowkey_order(int32_t session_id, const common::ObTabletID &tablet_id, const blocksstable::ObDatumRow &datum_row); sql::ObLoadDupActionType get_action() const {return param_.dup_action_;} + uint64_t get_capacity() const { return capacity_; } TO_STRING_KV(K_(capacity), K_(error_row_cnt), K_(repeated_row_cnt), K_(session_cnt), K_(is_inited)); private: int inner_append_error_row(const common::ObNewRow &row, diff --git a/src/storage/direct_load/ob_direct_load_data_fuse.cpp b/src/storage/direct_load/ob_direct_load_data_fuse.cpp index 434a0cc1a6..f5a6682490 100644 --- a/src/storage/direct_load/ob_direct_load_data_fuse.cpp +++ b/src/storage/direct_load/ob_direct_load_data_fuse.cpp @@ -232,7 +232,11 @@ int ObDirectLoadDataFuse::inner_get_next_row(const ObDatumRow *&datum_row) } else { ObTableLoadErrorRowHandler *error_row_handler = param_.error_row_handler_; if (OB_FAIL(error_row_handler->append_error_row(*item->datum_row_))) { - LOG_WARN("fail to append row to error row handler", KR(ret), K(item->datum_row_)); + if ((OB_ERR_TOO_MANY_ROWS == ret) + && (0 == param_.error_row_handler_->get_capacity())){ + ret = OB_ERR_PRIMARY_KEY_DUPLICATE; + } + LOG_WARN("fail to append row to error row handler", KR(ret), KPC(item->datum_row_)); } } } else if (ObLoadDupActionType::LOAD_IGNORE == param_.dup_action_) {