Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion be/src/olap/rowset/segment_v2/segment_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,11 @@ Status SegmentWriter::_create_column_writer(uint32_t cid, const TabletColumn& co

if (column.is_row_store_column()) {
// smaller page size for row store column
opts.data_page_size = _tablet_schema->row_store_page_size();
auto page_size = _tablet_schema->row_store_page_size();
opts.data_page_size =
(page_size > 0) ? page_size : segment_v2::ROW_STORE_PAGE_SIZE_DEFAULT_VALUE;
}

std::unique_ptr<ColumnWriter> writer;
RETURN_IF_ERROR(ColumnWriter::create(opts, &column, _file_writer, &writer));
RETURN_IF_ERROR(writer->init());
Expand Down
5 changes: 4 additions & 1 deletion be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,11 @@ Status VerticalSegmentWriter::_create_column_writer(uint32_t cid, const TabletCo

if (column.is_row_store_column()) {
// smaller page size for row store column
opts.data_page_size = _tablet_schema->row_store_page_size();
auto page_size = _tablet_schema->row_store_page_size();
opts.data_page_size =
(page_size > 0) ? page_size : segment_v2::ROW_STORE_PAGE_SIZE_DEFAULT_VALUE;
}

std::unique_ptr<ColumnWriter> writer;
RETURN_IF_ERROR(ColumnWriter::create(opts, &column, _file_writer, &writer));
RETURN_IF_ERROR(writer->init());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ public void gsonPostProcess() throws IOException {
buildEnableLightSchemaChange();
buildStoreRowColumn();
buildRowStoreColumns();
buildRowStorePageSize();
buildSkipWriteIndexOnLoad();
buildCompactionPolicy();
buildTimeSeriesCompactionGoalSizeMbytes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected Partition createPartitionWithIndices(long dbId, OlapTable tbl, long pa
IdGeneratorBuffer idGeneratorBuffer,
BinlogConfig binlogConfig,
boolean isStorageMediumSpecified,
List<Integer> clusterKeyIndexes, long pageSize)
List<Integer> clusterKeyIndexes)
throws DdlException {
// create base index first.
Preconditions.checkArgument(tbl.getBaseIndexId() != -1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public class PropertyAnalyzer {

// row store page size, default 16KB
public static final String PROPERTIES_ROW_STORE_PAGE_SIZE = "row_store_page_size";
public static final long ROW_STORE_PAGE_SIZE_DEFAULT_VALUE = 16384;
public static final long ROW_STORE_PAGE_SIZE_DEFAULT_VALUE = 16384L;

public static final String PROPERTIES_ENABLE_LIGHT_SCHEMA_CHANGE = "light_schema_change";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,7 @@ public PartitionPersistInfo addPartition(Database db, String tableName, AddParti
singlePartitionDesc.isInMemory(),
singlePartitionDesc.getTabletType(),
storagePolicy, idGeneratorBuffer,
binlogConfig, dataProperty.isStorageMediumSpecified(), null, olapTable.rowStorePageSize());
binlogConfig, dataProperty.isStorageMediumSpecified(), null);
// TODO cluster key ids

// check again
Expand Down Expand Up @@ -2006,7 +2006,7 @@ protected Partition createPartitionWithIndices(long dbId, OlapTable tbl, long pa
IdGeneratorBuffer idGeneratorBuffer,
BinlogConfig binlogConfig,
boolean isStorageMediumSpecified,
List<Integer> clusterKeyIndexes, long rowStorePageSize)
List<Integer> clusterKeyIndexes)
throws DdlException {
// create base index first.
Preconditions.checkArgument(tbl.getBaseIndexId() != -1);
Expand Down Expand Up @@ -2090,7 +2090,7 @@ protected Partition createPartitionWithIndices(long dbId, OlapTable tbl, long pa
tbl.getTimeSeriesCompactionLevelThreshold(),
tbl.storeRowColumn(), binlogConfig,
tbl.getRowStoreColumnsUniqueIds(rowStoreColumns),
objectPool, rowStorePageSize);
objectPool, tbl.rowStorePageSize());

task.setStorageFormat(tbl.getStorageFormat());
task.setInvertedIndexFileStorageFormat(tbl.getInvertedIndexFileStorageFormat());
Expand Down Expand Up @@ -2880,7 +2880,7 @@ private boolean createOlapTable(Database db, CreateTableStmt stmt) throws UserEx
idGeneratorBuffer,
binlogConfigForTask,
partitionInfo.getDataProperty(partitionId).isStorageMediumSpecified(),
keysDesc.getClusterKeysColumnIds(), olapTable.rowStorePageSize());
keysDesc.getClusterKeysColumnIds());
afterCreatePartitions(db.getId(), olapTable.getId(), null,
olapTable.getIndexIdList(), true);
olapTable.addPartition(partition);
Expand Down Expand Up @@ -2963,7 +2963,7 @@ private boolean createOlapTable(Database db, CreateTableStmt stmt) throws UserEx
partionStoragePolicy, idGeneratorBuffer,
binlogConfigForTask,
dataProperty.isStorageMediumSpecified(),
keysDesc.getClusterKeysColumnIds(), olapTable.rowStorePageSize());
keysDesc.getClusterKeysColumnIds());
olapTable.addPartition(partition);
olapTable.getPartitionInfo().getDataProperty(partition.getId())
.setStoragePolicy(partionStoragePolicy);
Expand Down Expand Up @@ -3430,7 +3430,7 @@ public void truncateTable(TruncateTableStmt truncateTableStmt) throws DdlExcepti
olapTable.getPartitionInfo().getDataProperty(oldPartitionId).getStoragePolicy(),
idGeneratorBuffer, binlogConfig,
copiedTbl.getPartitionInfo().getDataProperty(oldPartitionId).isStorageMediumSpecified(),
clusterKeyIdxes, olapTable.rowStorePageSize());
clusterKeyIdxes);
newPartitions.add(newPartition);
}

Expand Down
2 changes: 1 addition & 1 deletion gensrc/thrift/AgentService.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct TTabletSchema {
19: optional list<i32> cluster_key_idxes
// col unique id for row store column
20: optional list<i32> row_store_col_cids
21: optional i64 row_store_page_size = 16384;
21: optional i64 row_store_page_size = 16384
}

// this enum stands for different storage format in src_backends
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !select_star --
1 1 1 a

-- !select_star --
3 3 \N c

-- !select_star --
1 1 1 a

Loading