Skip to content

Commit

Permalink
feat(store): add config streamSplitSizeThreshold (#576)
Browse files Browse the repository at this point in the history
Signed-off-by: SSpirits <[email protected]>
  • Loading branch information
ShadowySpirits authored Nov 6, 2023
1 parent edbca63 commit 097afdc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class S3StreamConfig {
private long walObjectCompactionStreamSplitSize = 16 * 1024 * 1024;
private int walObjectCompactionForceSplitPeriod = 120;
private int walObjectCompactionMaxObjectNum = 500;
private int streamSplitSizeThreshold = 16777216;

public String s3Endpoint() {
return s3Endpoint;
Expand Down Expand Up @@ -112,4 +113,8 @@ public int walObjectCompactionForceSplitPeriod() {
public int walObjectCompactionMaxObjectNum() {
return walObjectCompactionMaxObjectNum;
}

public int streamSplitSizeThreshold() {
return streamSplitSizeThreshold;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,14 @@ private Config configFrom(S3StreamConfig streamConfig) {
config.s3StreamObjectCompactionIntervalMinutes(streamConfig.streamObjectCompactionIntervalMinutes());
config.s3StreamObjectCompactionMaxSizeBytes(streamConfig.streamObjectCompactionMaxSizeBytes());
config.s3StreamObjectCompactionLivingTimeMinutes(streamConfig.streamObjectCompactionLivingTimeMinutes());

config.s3WALObjectCompactionInterval(streamConfig.walObjectCompactionInterval());
config.s3WALObjectCompactionCacheSize(streamConfig.walObjectCompactionCacheSize());
config.s3WALObjectCompactionUploadConcurrency(streamConfig.walObjectCompactionUploadConcurrency());
config.s3WALObjectCompactionMaxObjectNum(streamConfig.walObjectCompactionMaxObjectNum());
config.s3WALObjectCompactionForceSplitPeriod(streamConfig.walObjectCompactionForceSplitPeriod());
config.s3WALObjectCompactionStreamSplitSize(streamConfig.walObjectCompactionStreamSplitSize());
config.s3StreamSplitSize(streamConfig.streamSplitSizeThreshold());
return config;
}
}

0 comments on commit 097afdc

Please sign in to comment.