[CP] disable small sstable for large row count
This commit is contained in:
parent
e586e6be82
commit
486b2fac6c
@ -101,6 +101,16 @@
|
||||
"value": "column",
|
||||
"comment": "default to column format for AP"
|
||||
},
|
||||
{
|
||||
"name": "_io_read_batch_size",
|
||||
"value": "128K",
|
||||
"comment": "Maximum batch size in one read io request"
|
||||
},
|
||||
{
|
||||
"name": "_io_read_redundant_limit_percentage",
|
||||
"value": "50",
|
||||
"comment": "Maximum percentage of redundant size in one read io request, redundant data means blocks in the middle of the batch that hit in cache or filtered by skipping index but must be read"
|
||||
},
|
||||
{
|
||||
"name": "_rowsets_max_rows",
|
||||
"value": 256,
|
||||
|
@ -519,7 +519,7 @@ int ObSSTableIndexBuilder::init(const ObDataStoreDesc &data_desc,
|
||||
} else {
|
||||
index_store_desc_.get_desc().sstable_index_builder_ = this;
|
||||
callback_ = callback;
|
||||
optimization_mode_ = data_desc.is_cg() && data_desc.get_major_working_cluster_version() >= DATA_VERSION_4_3_2_0 ? DISABLE : mode;
|
||||
optimization_mode_ = mode;
|
||||
if (OB_FAIL(leaf_store_desc_.shallow_copy(index_store_desc_.get_desc()))) {
|
||||
STORAGE_LOG(WARN, "fail to assign leaf store desc", K(ret));
|
||||
} else {
|
||||
@ -986,7 +986,12 @@ int ObSSTableIndexBuilder::close(
|
||||
} else if (check_version_for_small_sstable(index_store_desc_.get_desc()) && 0 == nested_offset) {
|
||||
const bool is_single_block = check_single_block();
|
||||
if (is_single_block) {
|
||||
switch (optimization_mode_) {
|
||||
ObSpaceOptimizationMode tmp_mode = optimization_mode_;
|
||||
// tmp code, we should support reuse data for small sstable
|
||||
if (index_store_desc_.get_desc().is_cg() && res.row_count_ > 50000) {
|
||||
tmp_mode = DISABLE;
|
||||
}
|
||||
switch (tmp_mode) {
|
||||
case ENABLE:
|
||||
if (OB_FAIL(check_and_rewrite_sstable(res))) {
|
||||
STORAGE_LOG(WARN, "fail to check and rewrite small sstable", K(ret));
|
||||
|
Loading…
x
Reference in New Issue
Block a user