Commit Graph

1144 Commits (83d28ec079af7f73afd6509b4e9545a07410c166)

Author SHA1 Message Date
davidby-influx eea87ba94c
fix: log rejected writes to subscriptions (#25589)
Log writes to subscriptions that are rejected because
the queue is full by bytes or by length metrics.
2024-11-25 16:11:04 -08:00
davidby-influx 07c261a21a
feat: allow the specification of a write window for retention policies (#25517)
Add FutureWriteLimit and PastWriteLimit to retention
policies. Points which are outside of
now() + FutureWriteLimit
or
now() - PastWriteLimit
will be rejected on write with a PartialWriteError.

closes https://github.com/influxdata/influxdb/issues/25424
2024-11-15 13:30:14 -08:00
davidby-influx d2f874b411
feat: improve logging for subscriptions
Print the subscription name, destination,
retention policy, and database on errors in subscription writes

closes https://github.com/influxdata/influxdb/issues/25518
2024-11-14 15:47:07 -08:00
davidby-influx e3e9232de5
fix: strip double quotes from measurement names in v2/delete (#25407)
When searching for a measurement in the v2/delete API,
remove any quotes put on the measurement name (e.g. to
alllow special characters) before string comparisons.

closes https://github.com/influxdata/influxdb/issues/25406
2024-09-27 09:35:26 -07:00
WeblWabl a6a3bdd0f0
feat(edge): Add 'flux enabled' to 'show diagnostics' (#25308)
* feat(edge): Add 'flux enabled' to 'show diagnostics'

* fix(ci): empty for ci re-run
2024-09-12 11:43:02 -05:00
Geoffrey Wossum 2cf2103cc4
feat: add hook for optimizing series reads based on authorizer (#25207) 2024-08-02 15:03:44 -05:00
davidby-influx c4bfaa8954
fix: Store.validateArgs wrongfully overwriting start, end unix time (#25146) (#25165)
When querying data before 1970-01-01 (UNIX time 0)
validateArgs would set start to -in64 max and end to int64 max.

closes https://github.com/influxdata/influxdb/issues/24669

Co-authored-by: Paul Hegenberg <paul.hegenberg@gmail.com>

closes https://github.com/influxdata/influxdb/issues/25149
2024-07-16 08:35:17 -07:00
Geoffrey Wossum b4bd607eef
fix: prevent retention service from hanging (#25055)
* fix: prevent retention service from hanging

Fix issue that can cause the retention service to hang waiting on a
`Shard.Close` call. When this occurs, no other shards will be deleted
by the retention service. This is usually noticed as an increase in
disk usage because old shards are not cleaned up.

The fix adds to new methods to `Store`, `SetShardNewReadersBlocked`
and `InUse`. `InUse` can be used to poll if a shard has active readers,
which the retention service uses to skip over in-use shards to prevent
the service from hanging. `SetShardNewReadersBlocked` determines if
new read access may be granted to a shard. This is required to prevent
race conditions around the use of `InUse` and the deletion of shards.

If the retention service skips over a shard because it is in-use, the
shard will be checked again the next time the retention service is run.
It can be deleted on subsequent checks if it is no longer in-use. If
the shards is stuck in-use, the retention service will not be able to
delete the shards, which can be observed in the logs for manual
intervention. Other shards can still be deleted by the retention service
even if a shard is stuck with readers.

closes: #25054
2024-06-13 11:07:17 -05:00
Brandon Pfeifer d4b16dcd98
chore: upgrade protocol buffers to v5.26.1 (#24949) 2024-05-01 11:00:26 -07:00
Jakub Bednář dbbe4611c0
build(deps): upgrade google.golang.org/protobuf to v1.33.0 (master-1.x) (#24818) 2024-03-26 14:07:28 +01:00
Geoffrey Wossum 8648298012
chore: upgrade to influxdata/influxql v1.2.0 (#24764)
Upgrade to influxdata/influxql v1.2.0. While it does not fix any
known issues in InfluxDB OSS 1.x, it is necessary for upstream
projects impacted by https://github.com/influxdata/influxql/issues/65.

In addition to upgrading influxdata/influxql, this also updates test
cases that relied on the erroneous precision handling when stringifying
InfluxQL ASTs.

Visible impacts to InfluxDB OSS 1.x:
- Changes precision of floating point numbers in error messages
  related to InfluxQL
- Changes precision of floating point numbers in "EXPLAIN" and
  "EXPLAIN ANALYZE" output
- Changes precision of floating point numbers from InfluxQL
  expressions included in tracing spans

closes: #24763
2024-03-14 12:42:03 -05:00
davidby-influx c05b340b72
chore: upgrade flux (#24504)
* chore: upgrade flux

* chore: execute "go generate" inside cross-builder (#24582)

---------

Co-authored-by: Brandon Pfeifer <bpfeifer@influxdata.com>
2024-01-19 17:40:48 -05:00
Geoffrey Wossum 7bd3f89d18
fix: prevent retention service creating orphaned shard files (#24530)
* fix: prevent retention service creating orphaned shard files

Under certain circumstances, the retention service can fail to delete shards from
the store in a timely manner. When the shard groups are pruned based on age, this
leaves orphaned shard files on the disk. The retention service will then not attempt
to remove the obsolete shard files because the meta store does not know about them.
This can cause excessive disk space usage for some users.

This corrects that by requiring shards files be deleted before they can be removed
from the meta store.

fixes: #24529
2024-01-04 11:59:28 -06:00
davidby-influx 2dc3dcb3d1
fix: do not escape CSV output (#24311)
CSV output is incorrectly escaped.
Add a boolean flag to tag output
functions to prevent this.

closes https://github.com/influxdata/influxdb/issues/24309
2023-06-29 12:00:41 -07:00
davidby-influx f365bb7e3a
fix: use nil Sources field in /api/v2/delete (#24145)
An empty slice in Sources causes an empty
WHERE clause to be generated by
Statement.String(). Use a nil in the field
to omit the WHERE clause completely

closes https://github.com/influxdata/influxdb/issues/24144
2023-03-17 07:38:14 -07:00
davidby-influx c31e99574f
fix: do not set measurement db or rp in V2 delete (#24141)
Setting the DB or RP in measurements extracted from
the predicate and used as sources causes Enterprise
/api/v2/delete to fail. The DB must explicitly be passed
to Store.Delete without being set in the measurement
struct passed as a source.

closes https://github.com/influxdata/influxdb/issues/24139
2023-03-15 18:59:08 -07:00
carlospeon 19d83dcad9
feat: add multiple UDP writers (#23909)
Co-authored-by: Carlos Peon Costa <carlospec@inditex.com>
2022-12-19 13:46:42 -08:00
Geoffrey Wossum ac350884d7
feat: include `crypto` diagnostics in `/debug/vars` output (#23948)
* feat: include `crypto` diagnostics in `/debug/vars` output

Pulls `crypto` diagnostics and includes them in `/debug/vars` output.
If no `crypto` diagnostics are available, then OSS crypto information will
be shown instead.

closes: #23947
2022-12-06 12:02:30 -06:00
Brandon Pfeifer e484c4d871
chore: upgrade Go to v1.19.3 (1.x) (#23941)
* chore: upgrade Go to 1.19.3

This re-runs ./generate.sh and ./checkfmt.sh to format and update
source code (this is primarily responsible for the huge diff.)

* fix: update tests to reflect sorting algorithm change
2022-11-28 12:15:47 -05:00
Brandon Pfeifer e68b64c57b
chore: make "flux-testing" public (#23935) 2022-11-21 14:10:10 -05:00
Brandon Pfeifer 5976e41d54
feat: upgrade flux to v0.188.0 (#23911)
* feat: upgrade flux to 0.171.0

Tests failing, safety commit

First step in https://github.com/influxdata/influxdb/issues/23815

* fix: remove "org" parameter" from writeOptSource

I attempted to implement the "orgOpt" argument in a similar fashion
to f6669f7512. However, it looks like Flux doesn't accept "org" as
a parameter to "load". It responds with:

Error calling function \"load\" @113:16-113:30: error calling function \"to\" @6:19-6:47: unused arguments [org]

This brings us from 194 passing to 570 passing.

* fix: temporarily disable broken flux tests

These tests expect rows to be stored in a certain order. However,
nothing is specifying the sort order. This has been fixed in a
later update to flux: (see 3d6f47ded).

Temporarily disable these tests until we include a fixed
version of the flux tests.

* chore: add tests from a492993012

This fixes "test-flux.sh" so it runs tests within the "flux/"
directory. This uncovered some other issues with the tests
located within "flux/". These also needed to be updated
to match the newer flux API.

* feat: upgrade flux to 0.172.0

This includes changes made in "cbbf4b27da". Since "test.go" in 2.x
diverged from 1.x, some modifications were required to make this
compatible.

* feat: upgrade flux to 0.173.0

* feat: upgrade flux to v0.174.0

* fix: Update the condition when reseting cursor (#23522)

Filters that contain `or` may change between cursor resets so we must remember to update the condition in the read cursor.

```flux
|> filter(fn: (r) => ((r["_field"] == "field1" and r["_value"]==true) or (r["_field"] == "field2" and r["_value"] == false)))
```

Closes https://github.com/influxdata/flux/issues/4804

* feat: upgrade flux to 0.174.1

* feat: upgrade flux to 0.175.0

* chore: remove end-to-end tests

These were removed in a492993 for 2.x. These tests prevent "go test ./..."
from completing. As stated in the original commit, these tests should now be
handled by the "fluxtest" harness.

* feat: upgrade flux to 0.176.0

Some tests needed to be disabled within the flux harness. This is a
result of enabling "Optimize Aggregate Window" in flux@05a1065f.
These tests are not present in 2.x. Therefore, I am unsure if
the breakage is resolved in a later commit.

* feat: upgrade flux to 0.177.0

* feat: upgrade flux to 0.178.0

* feat: upgrade flux to v0.179.0

This removes all invocations of "flux.RegisterOpSpec". According
to flux@e39096d5, "flux.RegisterOpSpec" does nothing in the
current version of flux and was removed.

* chore: update fluxtest skip list (#23633)

* chore: manually backport 785a465e9a

This removes the reference to "flux.Spec".

* build(flux): update flux to v0.181.0 (#23682)

* build(flux): update flux to v0.184.2

* chore: skip more Flux acceptance tests

There are issues for each skip detailed in test-flux.sh.

* feat: upgrade flux to v0.185.0

This adds "FluxTesting" to the "HTTPD" configuration. This option is
hidden and disabled by default. When "FluxTesting" is set, it
enables the default testing flags for "Flux".

These flags allow the "vectorized float tests" and tests requiring
the "removeRedundantSortNodes" and "labelPolymorphism" flag
enabled to work. These changes are based off of d8553c002e.

flux@3d6f47ded is included within this version of Flux. Therefore
we can now include the "group_*" tests.

* feat: upgrade flux to 0.186.0

* feat: upgrade flux to 0.187.0

* feat: upgrade flux to 0.188.0

* fix: re-run ./generate.sh with updated protoc

* fix: restrict cores to match CircleCI documentation

Co-authored-by: davidby-influx <dbyrne@influxdata.com>
Co-authored-by: Markus Westerlind <marwes91@gmail.com>
Co-authored-by: Sean Brickley <sean@wabr.io>
Co-authored-by: Jonathan A. Sternberg <jonathan@influxdata.com>
Co-authored-by: Christopher M. Wolff <chris.wolff@influxdata.com>
2022-11-15 15:20:27 -05:00
davidby-influx be9a3d4a07
fix: :db/:rp -> :dbrp, fixed create bucket, update bucket (#23898) (#23900)
Fix URL processing for V2 buckets API, add error checking.

(cherry picked from commit 636fbb3f79)

Co-authored-by: Vlasta Hajek <vlastimil.hajek@bonitoo.io>
2022-11-11 14:19:05 -08:00
davidby-influx b0e44a4659
fix: listBuckets properly returns wrapped response (#23879) (#23884)
closes https://github.com/influxdata/influxdb/issues/23861

(cherry picked from commit e6e0fd2d9c)

closes https://github.com/influxdata/influxdb/issues/23883

Co-authored-by: Vlasta Hajek <vlastimil.hajek@bonitoo.io>
2022-11-09 09:57:46 -08:00
davidby-influx bfccddc7b6
fix: log errors in continuous query statistics storage (#23822) 2022-10-19 08:33:44 -07:00
davidby-influx d862a82515
feat: add version number to debug/vars (#23795)
closes https://github.com/influxdata/influxdb/issues/23793
2022-10-13 11:49:30 -07:00
davidby-influx d01ea61465
feat: stub out bucket members, owners, and labels (#23294)
For the V2 buckets API, stub out the unsupportable endpoints.
2022-04-25 11:42:01 -07:00
davidby-influx ce40acb298
feat: partial /v2/api/buckets support: create, delete, list, retrieve, update (#23284)
Partially implements the /v2/api/buckets
POST for create a bucket
DELETE for deleting a bucket
GET for listing buckets
GET for retrieving one bucket
PATCH for modifying a bucket

See here for API details:
https://docs.influxdata.com/influxdb/cloud/api/#tag/Buckets
2022-04-21 16:36:19 -07:00
Yun Zhao 997698f891
fix(httpd): abort processing write request when encountering a precision error (#21746) 2022-04-14 13:56:24 -05:00
Dane Strandboge 0574163566
build: upgrade to go1.18 (#23250) 2022-03-31 16:17:57 -05:00
davidby-influx 2fe52d8edc
fix: implement v2/api/delete (#23247)
Support to V2 delete api

Does not support deletion by field, only by tag value, time, and measurement.
2022-03-31 13:40:14 -07:00
davidby-influx c3a958cb5f
fix: return underlying error creating a subscription (#23217)
When creating a subscription, return the wrapped error
on failure

closes https://github.com/influxdata/influxdb/issues/23216
2022-03-22 13:04:08 -07:00
Sam Arnold 3ce6cb45aa
fix: allow limiting shards during flux iterator reads (#23052) 2022-01-12 19:29:32 -05:00
Sam Arnold e8c9f54532
test: increase timeout in continuous query test (#22955)
Closes: #22954
2021-12-01 13:26:39 -08:00
Sam Arnold 956915296a
fix: use defer for unlock (#22929) 2021-11-24 14:43:46 -05:00
Dane Strandboge 449319a964
chore: upgrade `influx_tools` to new protobuf library (#22717) 2021-10-21 14:00:53 -05:00
Dane Strandboge 8b38d0e2bf
build: upgrade protobuf library (#22606) 2021-10-15 11:42:47 -05:00
Sam Arnold 611a4370a2
feat: show measurements database and retention policy wildcards (#22388)
* feat: show measurements database and retention policy wildcards

Closes #3318

* chore: run formatter
2021-10-05 09:07:25 -04:00
Sam Arnold 3c811bcd81
fix: create shards without overlaps (#22601) 2021-10-01 13:38:52 -04:00
Sam Arnold 38de69cc1c
fix: flux error properly read by cloud (#22348) 2021-08-31 17:43:12 -04:00
Sam Arnold d0fe2ba2ff
fix: error instead of panic when enterprise tries to restore with OSS (#22019) 2021-08-03 15:56:19 -04:00
Sam Arnold 733a6b4245
feat: add subscription buffer size usage metric (#22020) 2021-08-03 14:32:41 -04:00
Sam Arnold 5bbb61b815
fix: restore portable backup error (#21978)
Originally committed by rickif in https://github.com/influxdata/influxdb/pull/20115/files

This is manual copy of the changes to master-1.x
2021-07-30 13:06:54 -04:00
Sam Arnold b64c2c3dcf
fix: tsi index should compact old or too-large log files (#21943)
* fix: tsi index should compact old log files that are too large

* chore: run automated formatter

* chore: update changelog

* fix: review comments
2021-07-26 17:40:15 -04:00
Jamie Strandboge dec56f9c31
chore: use community maintained golang-jwt (#21934)
The dgrijalva/jwt-go project is no longer maintained[1] and they have
transferred ownership to golang-jwt/jwt[2][3][4]. We should move to the
supported golang-jwt/jwt.

The following was performed:

1. update services/httpd/handler*.go to import golang-jwt/jwt
2. revert testcase string comparison changes from 225bcecd (back to v3)
2. go mod edit -require github.com/golang-jwt/jwt@v3.2.1+incompatible
3. go mod edit -droprequire github.com/dgrijalva/jwt-go
4. go mod tidy  # see note
5. go clean ./... && go build ./...
6. go test ./...

Note: 'go mod tidy' had unrelated changes (perhaps it wasn't run in
recent commits) so I removed the unrelated delta to keep this PR focused
on the dgrijalva/jwt-go to golang-jwt/jwt changes.

References:
[1] dgrijalva/jwt-go#462
[2] dgrijalva/jwt-go#463
[3] https://github.com/dgrijalva/jwt-go/blob/master/README.md
[4] https://github.com/golang-jwt/jwt
[5] https://github.com/influxdata/influxdb/issues/21926
2021-07-23 11:41:14 -05:00
Sam Arnold 23c3d35aab
chore: update protobuf library versions and remove influx_tsm (#21882)
* chore: update protobufs

* fix: run codegen during build

* fix: fully remove influx_tsm
2021-07-20 09:42:52 -04:00
Sam Arnold ac96fd45fb
feat: un-revert add total-buffer-bytes config parameter to subscriptions (#21804)
This reverts commit 4d82ed2c07.
2021-07-08 15:00:40 -04:00
Sam Arnold 4d82ed2c07
revert: revert add total-buffer-bytes config parameter to subscriptions (#21803)
Reverts PR #21752

This reverts commit 85abb3af36.
2021-07-07 15:37:37 -04:00
Sam Arnold 85abb3af36
feat: add total-buffer-bytes config parameter to subscriptions (#21752)
* chore: harmonize OSS and Enterprise subscriber initialization

* refactor: chanwriter close blocks until chanwriter is flushed

* refactor: remove redundant state

* test: add test for blocked subscriber during subscription update

* fix: blocked subscriber does not fail subscription update

* fix: only iterate matching subscriptions

* fix: use serialized points in subscriber queues

* feat: add total-buffer-bytes config parameter to subscriptions

* fix: put subscription serialization on the write path

* fix: subscription service only needs regular mutex, not RWMutex

* fix: review comments

* chore: update changelog
2021-07-06 15:56:01 -04:00
davidby-influx a08b69098e
fix: do not send non-UTF-8 characters to subscriptions (#21558)
Added a check for valid UTF-8 strings in measurement names,
tags name, tag values, and field names when writing to subscriptions. 
Do not send the failing points to subscribers, and log the errors if at
debug level logging

Closes https://github.com/influxdata/influxdb/issues/21557
2021-05-26 14:14:36 -07:00
Sam Arnold c6fbc2e66f
fix: FGA enablement (#21516)
* fix: FGA enablement

Closes #21514

* fix: FGA enablement

Closes #21515
2021-05-19 17:03:21 -04:00