提交 928beb2c 编写于 作者: R raywill 提交者: ob-robot

limit the max buffer size of PDML write

上级 08a026b5
......@@ -177,7 +177,14 @@ int ObPDMLOpBatchRowCache::add_row(const ObExprPtrIArray &row, ObTabletID tablet
int ret = OB_SUCCESS;
ObChunkDatumStore::StoredRow *stored_row = NULL;
ObChunkDatumStore *row_store = NULL;
if (OB_FAIL(process_dump())) {
// to address storage write throttle, we limit the max buffer size of PDML write.
// the 2MB config is tested optimal under PDML concurrency=4 and concurrency=8 cases
// TODO: maybe we can introduce a dynamic control policy
// concidering the tenant overall access behavior to storage
constexpr int64_t max_pdml_cache_size_per_thread = 2 * 1024 * 1024;
if (!with_barrier_ && cached_rows_size_ > max_pdml_cache_size_per_thread) {
ret = OB_EXCEED_MEM_LIMIT;
} else if (OB_FAIL(process_dump())) {
if (OB_EXCEED_MEM_LIMIT != ret) {
LOG_WARN("fail process dump for PDML row cache", K(ret));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册