Commit Graph

63 Commits (535716044f274d78dab1f3d8992fc8a0b4edf80d)

Author SHA1 Message Date
Ben Johnson 1862b4421d
Integrate scanned values statistics tracking. 2018-11-28 15:32:06 -07:00
Mark Rushakoff a06d4dea16 refactor(query): explicitly shut down query controller
The flux query controller was updated to include a Shutdown method a
while ago. Explicitly handle query controller creation and shutdown
where applicable.

In influxd, this ensures that outstanding queries are handled before the
process dies. In tests, this ensures that query controller goroutines
aren't leaked, which drastically simplifies reading full stack traces.

This change also registers query controller metrics with the prometheus
registry in influxd.
2018-11-26 16:13:19 -08:00
Mark Rushakoff b0b0d965ff feat(task): integrate task logs with system buckets
- Brought over enterprise's QueryLogReader, with small adjustments
  - Time filters are for the run's ScheduledFor field, per spec
- Adjusted run log timestamps for consistent formatting:
  - ScheduledFor is RFC3339 because it's a whole-second timestamp
  - StartedAt, FinishedAt use RFC3339Nano for high precision
- Several test adjustments to use relative time, for easier integration
  with storage retention
2018-11-15 08:59:15 -08:00
Ben Johnson 37be1e9219
Add end-to-end write/query integration testing. 2018-11-15 09:08:36 -07:00
Jeff Wendling 2cbc2ee896 refactor wal out, paths, and options 2018-11-08 11:39:36 -07:00
Jeff Wendling 0d411023f2 config: clean up
- Breaks the weird cycle that existed with the EngineOptions
- Removes a bunch of useless parameters
- Moves around a bunch of defaults
2018-11-08 11:39:36 -07:00
Michael Desa 459f2cbfbb feat(cmd/influx): add local flag for operating directly with boltdb
feat(internal/fs): move influxDir function to internal package in base of repo

feat(cmd/influx): add local flag that operates on local file system

feat(cmd/influx): add local support for org command

feat(cmd/influx): add local support for user command

eat(cmd/influx): add local support for bucket command

feat(cmd/influx): add error for local with query/task/setup cmds

fix(cmd/influx): unshadow error in delete bucket command

fix(cmd/influx): update copy for local flag commands
2018-11-02 14:34:48 -04:00
Michael Desa 7227bf8fa2 feat(platform): add operation log for resources
feat(platform): add dashboard operation log interface

feat(bolt): add dashboard operation log to bolt client

feat(platform): add links to dashboard load response

fix(http): update links in json response of dashboards

feat(bolt): add operation logs for each resource

feat(http): add routes for operation logs

feat(cmd/influxd): set operation logs on http api backend
2018-11-02 14:21:14 -04:00
Jorge Landivar 34ab06634f
Merge pull request #1266 from influxdata/opentracing
open tracing context handling for tasks and for HTTP endpoints for tasks and query
2018-11-01 16:33:19 -05:00
docmerlin (j. Emrys Landivar) bcbd7b5c24 context handling for tasks and for HTTP endpoints for tasks and query 2018-11-01 16:29:52 -05:00
Mark Rushakoff 89813b8aa4 chore(cmd): fix megacheck errors 2018-11-01 12:54:46 -07:00
Mark Rushakoff c3e3b44a75 feat(task): include task scheduler metrics on /metrics endpoint
Closes #1223.
2018-10-30 18:52:02 -07:00
Kelvin Wang 74ef984e53 add http for telegraf 2018-10-30 14:00:10 -04:00
Chris Goller 7756f8dc6a feat(cmd/influxd): add log levels 2018-10-30 02:27:51 -05:00
Chris Goller eb5f4fbe8a refactor(cmd/influxd): use kit and close all services 2018-10-30 01:57:48 -05:00
Jorge Landivar 198793d955
Merge branch 'master' into cancel-task 2018-10-29 17:07:02 -05:00
Jonathan A. Sternberg 67dc4d8cdd
fix: conform to logging style guide for initial log messages
These are the log messages that get printed immediately when starting
the application for the first time. This fixes the messages to conform
to the logging style guide.
2018-10-29 16:42:55 -05:00
docmerlin (j. Emrys Landivar) 6e2620418c Now you can cancel runs 2018-10-29 16:08:50 -05:00
Lyon Hill 751a53dd24
Allow coordinator to pick up existing tasks on startup (#1187) 2018-10-25 13:50:41 -06:00
Lyon Hill 19b7709bad
Add tasks to the influx cli (#1163) 2018-10-23 11:51:13 -06:00
Mark Rushakoff 5af42835fa chore: default bolt db location to .influxdbv2 dir
Per previous discussion in #1065.
2018-10-12 16:39:02 -07:00
Mark Rushakoff 2958318c1f chore(bolt): log path of bolt file
Now at startup, there will be a log line like:

    Opened bolt database {"log_id": "0B5Oks9W000", "path": "influxd.bolt"}

Which gives a somewhat better idea of what's going on.
2018-10-12 08:14:50 -07:00
Jonathan A. Sternberg e7e17d6972
refactor: move the logger package from influxdb to platform
We are moving the necessary code for 2.0 from the influxdb 1.X
repository to the platform 2.0 repository. The logger is an unnecessary
dependency on the old influxdb that is making life more complicated.
2018-10-10 15:49:07 -05:00
Edd Robinson d5ed17adb2 Rename retention service 2018-10-10 15:40:08 +01:00
Edd Robinson 031bb7f502 Add prom metrics 2018-10-10 15:40:08 +01:00
Edd Robinson 4597fdea48 Wire Retention service into engine 2018-10-10 15:40:08 +01:00
Jeff Wendling 810833f33f chore: refactor reads service and make it consumable externally
This pulls in the code that allows doing reads with flux into the
platform repo, and removes extra.go.

The reusable portion is under storage/reads, where the concrete
implementation for one of the platform's engines is in
storage/readservice.

In order to make this more reusable, the cursors had to move into
their own package, decoupling it from all of the other code in the
tsdb package. tsdb/cursors is this new package, and type/function
aliases have been added to the tsdb package to point at it.

The models package already is very light on transitive dependencies
and so it was allowed to be depended on in a concrete way in the
cursors package.

Finally, the protobuf definitions for issuing GRPC reads has been
moved into its own package for two reasons:
    1. It's a clean separation, and helps keep it that way.
    2. Many/most consumers will not be using GRPC. We just
       use the datatypes to express the API which helps making
       a GRPC server easier.
It is left up to future refactorings (specifically ones that involve
GPRC) to determine if these types should remain, or if there is a
cleaner way.

There's still some dependencies on both github.com/influxdata/influxql
and github.com/influxdata/influxdb/logger that we can hopefully remove
in future refactorings.
2018-10-09 09:51:13 -06:00
Chris Goller 90494a5309 chore(fmt): fix and simplify go formatting 2018-10-08 17:23:54 -05:00
Jeff Wendling 0360fc418c Remove empty index package for tsi1 2018-10-08 13:18:30 -06:00
Jeff Wendling c48fac9880 chore: remove some undesirable code 2018-10-08 11:20:31 -06:00
Edd Robinson 81e0fbabeb Integrate WAL into engine 2018-10-05 12:44:27 +01:00
Adam 58f4e9fc0b
Refactor Platform according to new organization in `flux` (#966)
We reorganized the functions in flux to have the structure:
/functions
/inputs
/transformations
/outputs
this PR catches up platform to work with the new package layout.

As a separate refactoring issue, we should discuss:

from(bucket: ) should migrate from flux --> platform
to_http and to_kafka should migrate from platform --> flux
2018-10-05 00:06:14 -04:00
Mark Rushakoff a919806ac8 fix: eliminate data race in cmd/influxd
The race detector was picking up a data race because of the
unsynchronized reassignment of ctx:

```
$ go run -race ./cmd/influxd
...
^C
==================
WARNING: DATA RACE
Write at 0x00c00053d220 by main goroutine:
  main.platformF()
      /Users/mr/gomod/platform/cmd/influxd/main.go:381 +0x2cf7
  github.com/spf13/cobra.(*Command).execute()
      /Users/mr/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x8b2
  github.com/spf13/cobra.(*Command).ExecuteC()
      /Users/mr/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x432
  github.com/spf13/cobra.(*Command).Execute()
      /Users/mr/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800 +0x38
  main.Execute()
      /Users/mr/gomod/platform/cmd/influxd/main.go:388 +0x4e
  main.main()
      /Users/mr/gomod/platform/cmd/influxd/main.go:46 +0x2f

Previous read at 0x00c00053d220 by goroutine 147:
  main.platformF.func1()
      /Users/mr/gomod/platform/cmd/influxd/main.go:330 +0x3c

Goroutine 147 (running) created at:
  main.platformF()
      /Users/mr/gomod/platform/cmd/influxd/main.go:329 +0x2554
  github.com/spf13/cobra.(*Command).execute()
      /Users/mr/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x8b2
  github.com/spf13/cobra.(*Command).ExecuteC()
      /Users/mr/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x432
  github.com/spf13/cobra.(*Command).Execute()
      /Users/mr/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800 +0x38
  main.Execute()
      /Users/mr/gomod/platform/cmd/influxd/main.go:388 +0x4e
  main.main()
      /Users/mr/gomod/platform/cmd/influxd/main.go:46 +0x2f
==================
```

So just assign context.WithCancel to a new variable instead.
2018-10-04 11:46:08 -07:00
Edd Robinson 41aba8b539 Tidy up tag keys 2018-10-04 10:52:36 +01:00
Edd Robinson cfb3df203a Working storage engine 2018-10-04 10:24:43 +01:00
Jeff Wendling 8c338df860 Add very hacky read support 2018-10-04 10:24:43 +01:00
Jeff Wendling d18814267e Add very basic write support 2018-10-04 10:21:22 +01:00
Jeff Wendling 5fa10786a2 Fix issue with rebasing 2018-10-03 17:40:01 -06:00
Jeff Wendling 831833dcab Use _field/_measurement in filter expressions 2018-10-03 17:39:30 -06:00
Jeff Wendling eaff1bd9b0 Return _measurement/_field instead of _m/_f 2018-10-03 17:39:30 -06:00
Jeff Wendling 6a0fc9237c Read/write points with the appropriate measurement 2018-10-03 17:39:30 -06:00
Jeff Wendling 76cb1213f3 Add very hacky read support 2018-10-03 17:39:30 -06:00
Jeff Wendling c659c24f9a Add very basic write support 2018-10-03 17:39:30 -06:00
Jade McGough 0acb1429ab fix(http): fix failed rebase 2018-10-02 15:31:18 -07:00
Jade McGough 5e94d059e5 feat(http): add owner/member endpoints for bucket service 2018-10-02 15:31:18 -07:00
Jade McGough 802cd0080e feat(http): move member/owner routes to factories 2018-10-02 15:31:18 -07:00
Michael Desa 0cf834e532 chore(platform): refactor platform http handler to allow for auth 2018-10-02 14:11:44 -04:00
Michael Desa aa25727979 feat(platform): add /api/v2/sign{in,out} routes to platform handler 2018-10-02 14:11:44 -04:00
kelwang fdbca49c2e
Merge pull request #824 from influxdata/feat/default_ids
feat: add onboarding defaults
2018-09-27 15:26:11 -04:00
Jade McGough 232d87b9ac
feat(bolt): user-resource mapping boltdb implementation (#900)
* add bolt tests for user resource mapping

* add function boilerplate

* add more segfaults

* add create fn for bolt mapping

* initialize user resource mapping bucket

* fix error message

* add find user mapping fn

* fix error message

* implement user resource mapping filter fn

* add rest of user resource mapping filter fn
2018-09-27 12:15:26 -07:00