Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[conf][server] Make the size of the threads pool in tablet server scheduler configurable. #126

Merged
merged 3 commits into from
Dec 17, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ public class ConfigOptions {
+ WRITER_ID_EXPIRATION_TIME.key()
+ " passing. The default value is 10 minutes.");

public static final ConfigOption<Integer> BACKGROUND_THREADS =
key("server.background.threads")
.intType()
.defaultValue(10)
.withDescription(
"The number of threads to use for various background processing tasks.");

// ------------------------------------------------------------------
// ZooKeeper Settings
// ------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicBoolean;

import static com.alibaba.fluss.config.ConfigOptions.BACKGROUND_THREADS;

/**
* Tablet server implementation. The tablet server is responsible to manage the log tablet and kv
* tablet.
Expand Down Expand Up @@ -151,8 +153,7 @@ protected void startServices() throws Exception {

this.metadataCache = new ServerMetadataCacheImpl();

// TODO set scheduler thread number.
this.scheduler = new FlussScheduler(10);
this.scheduler = new FlussScheduler(conf.get(BACKGROUND_THREADS));
scheduler.startup();

this.logManager =
Expand Down
1 change: 1 addition & 0 deletions website/docs/maintenance/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ during the Fluss cluster working.
| data.dir | String | /tmp/fluss-data | This configuration controls the directory where fluss will store its data. The default value is /tmp/fluss-data |
| server.writer-id.expiration-time | Duration | 7d | The time that the tablet server will wait without receiving any write request from a client before expiring the related status. The default value is 7 days. |
| server.writer-id.expiration-check-interval | Duration | 10min | The interval at which to remove writer ids that have expired due to 'server.writer-id.expiration-time passing. The default value is 10 minutes. |
| server.background.threads | Integer | 10 | The number of threads to use for various background processing tasks. The default value is 10. |

### Zookeeper

Expand Down
Loading