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

feat: Expose a subset of InfluxQL coordinator tuning options #19508

Merged
merged 2 commits into from
Sep 5, 2020
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ need to update any InfluxDB CLI config profiles with the new port number.
1. [19402](https://github.com/influxdata/influxdb/pull/19402): Inject Task's LatestSuccess Timestamp In Flux Extern
1. [19433](https://github.com/influxdata/influxdb/pull/19433): Add option to dump raw query results in CLI
1. [19506](https://github.com/influxdata/influxdb/pull/19506): Add TSM 1.x storage options as flags
1. [19508](https://github.com/influxdata/influxdb/pull/19508): Add subset of InfluxQL coordinator options as flags

### Bug Fixes

Expand Down
36 changes: 32 additions & 4 deletions cmd/influxd/launcher/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,23 @@ func launcherOpts(l *Launcher) []cli.Opt {
Flag: "storage-tsm-use-madv-willneed",
Desc: "Controls whether we hint to the kernel that we intend to page in mmap'd sections of TSM files.",
},

// InfluxQL Coordinator Config
{
DestP: &l.CoordinatorConfig.MaxSelectPointN,
Flag: "influxql-max-select-point",
Desc: "The maximum number of points a SELECT can process. A value of 0 will make the maximum point count unlimited. This will only be checked every second so queries will not be aborted immediately when hitting the limit.",
},
{
DestP: &l.CoordinatorConfig.MaxSelectSeriesN,
Flag: "influxql-max-select-series",
Desc: "The maximum number of series a SELECT can run. A value of 0 will make the maximum series count unlimited.",
},
{
DestP: &l.CoordinatorConfig.MaxSelectBucketsN,
Flag: "influxql-max-select-buckets",
Desc: "The maximum number of group by time bucket a SELECT can create. A value of zero will max the maximum number of buckets unlimited.",
},
}
}

Expand Down Expand Up @@ -478,6 +495,9 @@ type Launcher struct {
engine Engine
StorageConfig storage.Config

// InfluxQL query engine
CoordinatorConfig iqlcoordinator.Config

queryController *control.Controller

httpPort int
Expand Down Expand Up @@ -920,12 +940,20 @@ func (m *Launcher) run(ctx context.Context) (err error) {
DBRP: dbrpSvc,
}

m.log.Info("Configuring InfluxQL statement executor (zeros indicate unlimited).",
zap.Int("max_select_point", m.CoordinatorConfig.MaxSelectPointN),
zap.Int("max_select_series", m.CoordinatorConfig.MaxSelectSeriesN),
zap.Int("max_select_buckets", m.CoordinatorConfig.MaxSelectBucketsN))

qe := iqlquery.NewExecutor(m.log, cm)
se := &iqlcoordinator.StatementExecutor{
MetaClient: metaClient,
TSDBStore: m.engine.TSDBStore(),
ShardMapper: mapper,
DBRP: dbrpSvc,
MetaClient: metaClient,
TSDBStore: m.engine.TSDBStore(),
ShardMapper: mapper,
DBRP: dbrpSvc,
MaxSelectPointN: m.CoordinatorConfig.MaxSelectPointN,
MaxSelectSeriesN: m.CoordinatorConfig.MaxSelectSeriesN,
MaxSelectBucketsN: m.CoordinatorConfig.MaxSelectBucketsN,
}
qe.StatementExecutor = se
qe.StatementNormalizer = se
Expand Down