Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit 4e311f5

Browse files
committed
Make partition concurrency configurable../../idx/cassandra/cassandra.go
1 parent 477a4a5 commit 4e311f5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

idx/cassandra/config.go

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type IdxConfig struct {
3939
numConns int
4040
protoVer int
4141
disableInitialHostLookup bool
42+
initLoadConcurrency int
4243
}
4344

4445
// NewIdxConfig returns IdxConfig with default values set.
@@ -64,6 +65,7 @@ func NewIdxConfig() *IdxConfig {
6465
auth: false,
6566
username: "cassandra",
6667
password: "cassandra",
68+
initLoadConcurrency: 1,
6769
}
6870
}
6971

@@ -92,6 +94,7 @@ func ConfigSetup() *flag.FlagSet {
9294
casIdx.BoolVar(&CliConfig.updateCassIdx, "update-cassandra-index", CliConfig.updateCassIdx, "synchronize index changes to cassandra. not all your nodes need to do this.")
9395
casIdx.DurationVar(&CliConfig.updateInterval, "update-interval", CliConfig.updateInterval, "frequency at which we should update the metricDef lastUpdate field, use 0s for instant updates")
9496
casIdx.DurationVar(&CliConfig.pruneInterval, "prune-interval", CliConfig.pruneInterval, "Interval at which the index should be checked for stale series.")
97+
casIdx.IntVar(&CliConfig.initLoadConcurrency, "init-load-concurrency", CliConfig.initLoadConcurrency, "Number of partitions to load concurrently on startup.")
9598
casIdx.IntVar(&CliConfig.protoVer, "protocol-version", CliConfig.protoVer, "cql protocol version to use")
9699
casIdx.BoolVar(&CliConfig.createKeyspace, "create-keyspace", CliConfig.createKeyspace, "enable the creation of the index keyspace and tables, only one node needs this")
97100
casIdx.StringVar(&CliConfig.schemaFile, "schema-file", CliConfig.schemaFile, "File containing the needed schemas in case database needs initializing")

0 commit comments

Comments
 (0)