Commit Graph

1895 Commits (3d9f8b5020daf5e3759e6bf1570324d77a4cbe44)

Author SHA1 Message Date
Ayan George 431f073b9e
feat: Add -lponly flag to export sub-command ()
When applied, this patch will add the -lponly flag to the export command
which instructs influx_inspect to only output line protocol without
comments and other out-of-band data.
2020-09-22 10:09:09 -04:00
Tristan Su f24f644510
chore: fix code format () 2020-06-22 15:23:36 -07:00
Tristan Su 17d192e062
chore(dumptsm): clean up dead code () 2020-06-22 15:02:53 -07:00
Ben Johnson 848ca48225 fix(tsdb): Revert "fix: remove some unsafe marshalling to reduce risk of segfault"
This reverts commit 30dab03310.
2020-04-13 13:22:22 -06:00
David Norton 25381f97c8
Merge pull request from influxdata/er-verify-tombstone
feat(inspect): add influx_inspect verify-tombstone tool
2020-03-11 15:56:37 -04:00
David Norton fca2ee03a7 fix: update package comment 2020-03-11 15:37:02 -04:00
David Norton 0fcb240ebb fix: use highest verbosity level specified 2020-03-11 15:32:34 -04:00
David Norton b93bac197c fix: typo in error message 2020-03-11 15:28:45 -04:00
docmerlin (j. Emrys Landivar) 30dab03310 fix: remove some unsafe marshalling to reduce risk of segfault
We were seing segfaults in Roaring bitmaps sometimes, under very
high load with networked drives.  This may reduce risk of segfault by
forcing marshalling to copy the data.
2020-03-11 13:47:29 -04:00
Stuart Carnie f71caf5c02
Merge pull request from influxdata/sgc/18/flux-cost
fix(flux): Reduce influxd and influx startup time if Flux unused
2020-03-02 15:16:13 -07:00
Ben Johnson 7a9eb1420c fix(tsdb): Fix -compact-series-file flag 2020-02-06 13:40:19 -07:00
Ayan George 85b5efc86e
refactor(influxdb): Refactor trace code for clarity and reliability
refactor(influxdb): Refactor trace code for clarity and reliability

* Make startProfile a method of Server.  startProfile() is only used one
  place.  We bother to copy the Server.CPUProfile and Server.MemProfile
  values out of our Server struct into it's parameters.  It makes more
  sense to make startProfile() a method of Server and have it access
  those members directory via its receiver value.

* Have startProfile() return an error instead of log.Fatal()ing.  We can
  simply propagate the error up the stack and let the caller handle the
  error -- we shouldn't be exiting deep in the bowels of a non-main
  package.

* Capture and return errors from pprof.StartCPUProfile(). Currently
  there is only one possible error it can return but if it returns an
  error, we should handle it.

* add CPUProfileWriteCloser and MemProfileWriteCloser to Server struct.

* make stopProfile() a method of Server

* remove prof variable

* fix captialization of log messages.
2020-02-04 11:31:15 -05:00
Edd Robinson 34c0fdafc0 feat(storage): Offline series file compaction 2020-02-03 13:57:31 -07:00
Stuart Carnie 5b58a81700
fix(flux): Flux startup costs should only be paid if Flux is used
This PR lazily initializes Flux built-in functions when Flux is used.

It significantly reduces the startup time of the `influxd` and `influx`
binaries.

Before (4.66s):

```
↳ time bin/18/influx
bin/18/influx  4.66s user 0.19s system 198% cpu 2.441 total
```

After (10ms):

```
↳ time bin/18/influx
bin/18/influx  0.01s user 0.01s system 88% cpu 0.021 total
```
2020-02-03 12:39:00 -07:00
Brandon Farmer c2c864d611 feat(influxdb): Add test around CLI proxy path 2020-01-22 14:13:25 -08:00
Brandon Farmer 6a621bf28b fix(influx): fixes parsing of url on connect 2020-01-21 12:02:32 -08:00
Brandon Farmer fe517fd9ce feat(influxdb): Add proxy path to cli 2020-01-21 10:23:46 -08:00
Edd Robinson 92b9bdef14 feat(inspect): add verify-tombstone 2019-11-17 14:53:39 +00:00
Edd Robinson f7f19c5904 refactor(storage): add tombstone extension 2019-11-17 14:43:38 +00:00
Jonathan A. Sternberg 40a7a577fc
Update flux version to v0.50.2
This upgrades the flux version to v0.50.2.

The secret service, which is used for alerts, is not included. The
`to()` function is also still not included.
2019-10-29 16:19:14 -05:00
Adam Perlin b8668c325a
Merge pull request from influxdata/influx-verify-panic-fix
fix(storage): replace panic with error in influx_inspect verify
2019-07-08 09:00:17 -07:00
Jonathan A. Sternberg 7ca4e644f1
Update flux version to v0.33.2 ()
The flux in influxdb has been upgraded to use v0.33.2. A lot of
interfaces for the storage engine were changed during this so code had
to change to accomodate the new interfaces and remove the old ones.

Included in this commit is a patch file for the changes that were made.
A patch was generated for the following packages:

* `flux/stdlib/influxdata/influxdb`
* `storage/reads`
* `tsdb/cursors`

These are the three packages that are in common with version 2 of the
database and the first of these packages contains the specific
implementations that are used for version 1.

It is very possible that the next time we upgrade this, the patch will
not apply cleanly just like it wouldn't have applied cleanly to this
update. The patch is mostly meant to document exactly what changed
during the copy over to help ensure we don't forget things when adapting
the interfaces.

Add a patch file to hopefully make this easier in the future
2019-06-27 13:52:02 -05:00
Adam Perlin 23bb49981a fix(storage): replace panic with error in influx_inspect verify 2019-06-25 12:11:42 -07:00
Diego Rabatone Oliveira decbf4e62d Remove query language from version command
There is no need to print such messages in the CLI output of the version
flag. Besides being unnecessary, it makes harder to automate some tests
for those installing influxDB CE by themselves and/or automating
dockerfiles.

Fix influxdata/influxdb/issues/10451
2019-04-29 13:51:30 -03:00
Jeff Wendling 6833c4d082 fix(influx_inspect): verify-seriesfile with deleted index entries
The series index looks at a set of tombstones when querying the id for
a given key, but it does not look when asking for the offset for some
id, even if that id is deleted.

Update the verify tooling to check that the index agrees with the
deleted status of the id, but skip doing the extra checks if the
id is deleted.
2019-04-17 12:24:23 -06:00
Jonathan A. Sternberg 31501c9dcf
Upgrade flux to the latest version and remove the platform dependency
This integrates the influxdb 1.x series to the latest version of Flux
and updates the code to use it. It also removes the dependency on
platform and copies the necessary code from storage into the 1.x series
so the dependency is unneeded.

The flux functions specific to 1.x have been moved to the same structure
that flux changed to with having a `stdlib` directory instead of a
`functions` directory. It also adds a `databases()` function that
returns the databases from the meta client.
2019-04-04 10:55:09 -05:00
Stuart Carnie 09a9d34430
fix(influx): Ensure credentials are passed for Flux queries
Fixes 
2019-03-29 16:39:34 -07:00
Stuart Carnie a43852958d
chore(gen): Back port improvements and changes from OSS 2.0
Specifically:

* renamed files for consistency between versions
* added `time-interval` schema option
* updated schema example documentation

Back port of improvements from 
2019-03-20 11:01:50 -07:00
Stuart Carnie 9b7ffd36ad feat(influx_tools): Add support for describing schema via a TOML file
The `influx_tools generate` command has a new option, `-schema`, for
specifying a TOML file which describes a desired schema.
2019-02-26 16:51:19 -07:00
Edd Robinson 42267331bd
Merge pull request from rda0/master
Fix legacy restore bug 
2019-02-11 10:23:15 +00:00
Edd Robinson 4356c06a71
Merge pull request from wrrn/error-golint
Fix linting errors in the errlist package
2019-02-01 07:58:05 -08:00
Stuart Carnie 8aba6f73a5
feat(influx_inspect): Add -check-utf8 to verify sub-command 2018-12-21 10:44:43 -07:00
Stuart Carnie 216cfa329f feat(flux): Add user authentication and authorization support
* Add AuthorizeDatabase API to QueryAuthorizer to verify a user has
  appropriate access to the specified database
* Update serverFluxQuery handler to require a meta.User when auth is
  enabled
* update Flux createFromSource and createBucketsSource dependencies to
  require Authorizer when auth is enabled in configuration
* update createFromSource to verify read permissions for each bucket
  specified in a Flux query
* update BucketsDecoder, which implements the buckets() Flux function,
  to return buckets that the user has read or write permissions to
* add unit tests to verify authentication is required for Flux HTTP
  requests when auth is enabled in configuration
2018-12-19 14:46:12 -07:00
Stuart Carnie 23d1281b2a feat(influx_tools): Add gen-init and gen-exec commands
* gen-init initializes a database based on the provided CLI spec
* gen-exec generates the data for the target database based on the same
  CLI spec as gen-init
2018-12-12 07:38:21 -07:00
Stuart Carnie 39a3d2335e chore(flux): Update to Flux 0.7.1
Resolve breaking API changes
2018-11-30 10:38:56 -07:00
Jeff Wendling c4a3ecf021 fix verify seriesfile in presence of tombstones
tombstone entries don't contain a key, and parsing the empty
key panics.
2018-11-21 11:07:38 -07:00
Stuart Carnie 6affa7c7f5 chore(flux): Remove Flux gRPC handler and update config.sample.toml 2018-11-05 14:26:37 -07:00
Stuart Carnie 5bcb952b6f chore(cli): Improve APIs to increase reuse in Enterprise 2018-11-02 09:16:42 -07:00
Stuart Carnie 2aa2768677 chore(cli): Remove flaky tests
The two deleted tests don't exercise any useful behavior or use cases.
2018-11-01 17:28:23 -07:00
Stuart Carnie c5ec3a3244 feat(influx): Add Flux support, enabled by specifying -type=flux 2018-10-25 11:12:14 -07:00
Stuart Carnie 9d1a8c97d8 feat(influx): Add `-type` switch and implement decision tree
* `-type` reports error for invalid values
* Implemented decision tree such that appropriate message is printed
  when Flux version of command is executed
* all variations for invoking influx identified in  work as
  expected
2018-10-25 11:12:14 -07:00
Ben Johnson 76df4371ee
Merge pull request from influxdata/bj-dumptsi-series-file-help
Add -series-file flag to dumptsi command help.
2018-10-17 08:52:50 -06:00
Jeff Wendling 69dc031a75 Use platform for most of the read service code
This commit deletes most of the code to service reads from influxdb
and pulls it in from platform instead.

Of note, the models.Tag and models.Tags types are now aliases to the
platform models.Tag and models.Tags types. Additionally, many types
in the tsdb package relating to cursors are also aliases to the same
types in the platform cursors package.

This updates the platform and flux repos to the current master in the
Gopkg.lock.
2018-10-10 11:20:25 -06:00
Edd Robinson c57c1744ed Set cache size when building TSI index
If there is a significant amount of data in the WAL, then building the
TSI index can be problematic without being able to set the max cache
size to something larger.

This commit adds an option to se the maximum cache size.
2018-10-08 16:26:37 +01:00
Ben Johnson 2cb97146f0
Fix series file tombstoning.
This commit fixes an issue with the series file compaction process
where tombstones are lost after compaction and series existence
checks are not correct. This commit also fixes some smaller flushing
issues within the series file that mainly related to testing.
2018-10-05 08:23:25 -06:00
Warren Harper 216feed8ed Fix linting errors in the errlist package
References 
2018-10-04 21:39:08 -04:00
Jonathan A. Sternberg 677552f093
Merge pull request from mschoenlaub/master
Print error message for unknown errors in client
2018-10-01 16:27:16 -05:00
Manuel Schoenlaub 15bd336efd
Print error message for unknown errors, e.g. server crashes without message 2018-10-01 16:25:37 -05:00
Adam 5bb62597c8
Backup continue on errors ()
* mod backup to continue if a shard fails to backup
2018-09-26 14:44:14 -04:00
Stuart Carnie 62b9791da8 feat(flux): Add initial support for executing Flux queries 2018-09-17 22:38:27 -07:00