diff --git a/src/storage/lob/ob_lob_manager.cpp b/src/storage/lob/ob_lob_manager.cpp index 571405b5e9..36a9acf0a8 100644 --- a/src/storage/lob/ob_lob_manager.cpp +++ b/src/storage/lob/ob_lob_manager.cpp @@ -3687,6 +3687,9 @@ int ObLobQueryRemoteReader::open(ObLobAccessParam& param, common::ObDataBuffer & int ret = OB_SUCCESS; char *buf = NULL; int64_t buf_len = ObLobQueryArg::OB_LOB_QUERY_BUFFER_LEN; + if (GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_4_3_0_0) { + buf_len *= ObLobQueryArg::OB_LOB_QUERY_OLD_LEN_REFACTOR; // compat with old vesion + } if (NULL == (buf = reinterpret_cast(param.allocator_->alloc(buf_len)))) { ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("failed to alloc buf", K(ret)); @@ -3694,6 +3697,7 @@ int ObLobQueryRemoteReader::open(ObLobAccessParam& param, common::ObDataBuffer & ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("failed to set rpc buffer", K(ret)); } else if (NULL == (buf = reinterpret_cast(param.allocator_->alloc(buf_len)))) { + ret = OB_ALLOCATE_MEMORY_FAILED; LOG_WARN("failed to alloc buf", K(ret)); } else { data_buffer_.assign_buffer(buf, buf_len); diff --git a/src/storage/lob/ob_lob_rpc_struct.h b/src/storage/lob/ob_lob_rpc_struct.h index 0ba7331270..6f11deca96 100644 --- a/src/storage/lob/ob_lob_rpc_struct.h +++ b/src/storage/lob/ob_lob_rpc_struct.h @@ -53,7 +53,8 @@ public: ~ObLobQueryArg(); TO_STRING_KV(K_(tenant_id), K_(offset), K_(len), K_(cs_type), K_(qtype), K_(scan_backward), K_(lob_locator)); public: - static const int64_t OB_LOB_QUERY_BUFFER_LEN = 2*1024L*1024L; + static const int64_t OB_LOB_QUERY_BUFFER_LEN = 256*1024L; + static const int64_t OB_LOB_QUERY_OLD_LEN_REFACTOR = 8; uint64_t tenant_id_; uint64_t offset_; // char offset uint64_t len_; // char len