Commit Graph

14834 Commits (6f46706b5208478b604995216eebd6f11349d5f9)

Author SHA1 Message Date
peterbarnett03 6f46706b52
chore: Updating 1.x README for clarity and direction (#25107)
Co-authored-by: Peter Barnett <peterbarnett@Peters-MBP.hsd1.sc.comcast.net>
2024-06-27 12:49:12 -04:00
davidby-influx d60741b506
fix: GROUP BY queries with offset that crosses a DST boundary fail. (#25082)
This is actually the second fix for
https://github.com/influxdata/influxdb/issues/20238
for when the time zone falls back in autumn.

closes https://github.com/influxdata/influxdb/issues/25078
2024-06-24 10:24:34 -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
davidby-influx b09e4b751f
fix: ignore empty index error deleting last measurement (#25037)
An empty index is appropriate when deleting the last
measurement.  Also clean up error handling, avoid
duplicate calls to Close.

closes https://github.com/influxdata/influxdb/issues/9929
2024-06-04 12:29:39 -07:00
davidby-influx 5fda409f39
fix: return MergeIterator.Close errors (#24975)
Ensure that errors from closing the
iterators underneath a MergeIterator
are returned up the stack.
2024-05-13 15:10:56 -07:00
Jakub Bednář d1da48634a
chore: upgrade go 1.21.9 -> 1.21.10 (master-1.x) (#24985) 2024-05-10 08:38:58 -05:00
davidby-influx 82cbdb5478
fix: ensure TSMBatchKeyIterator and FileStore close all TSMReaders (#24957)
Do not let errors on closing 
a TSMReader prevent other 
closes.
2024-05-06 09:59:30 -07:00
Brandon Pfeifer d4b16dcd98
chore: upgrade protocol buffers to v5.26.1 (#24949) 2024-05-01 11:00:26 -07:00
Jamie Strandboge f231da818f
chore: update golang.org/x/net to v0.23.0 (master-1.x) (#24930) 2024-04-19 12:13:08 -05:00
Brandon Pfeifer 44084c0f05
chore: upgrade go toolchain to 1.21.9 (#24912) 2024-04-12 14:48:57 -04: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
davidby-influx fe6c64b21e
fix: return and respect cursor errors (#24791)
ArrayCursors were ignoring errors, which led to panics when nil
cursors were operated on. This fix passes errors back up the stack
and uses them to enforce healthy cursor creation.

Closes https://github.com/influxdata/influxdb/issues/24789
---------
Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
2024-03-25 17:22:33 -07:00
davidby-influx 8ff06d5a92
fix: improved shard deletion (#24602)
Avoid unnecessarily deleting series from the series file
Try harder to delete series from InMem indices
Log all errors on shard deletion

Closes https://github.com/influxdata/influxdb/issues/24834
2024-03-25 17:15:31 -07:00
davidby-influx bc80e881fa
fix: do not panic when empty tags are queried (#24784)
Do not panic if a cursor array is nil and the number
of timestamps is retrieved.

closes https://github.com/influxdata/influxdb/issues/24536
2024-03-18 15:28:29 -07:00
Brandon Pfeifer 393178892e
fix: update "equals" to "equal" (#24777) 2024-03-15 16:55:41 -04:00
Brandon Pfeifer 59e84cc48b
chore: refactor unit tests (#24774) 2024-03-15 14:21:27 -04: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
Brandon Pfeifer 5ade548ea5
chore: upgrade go toolchain to 1.21.8 (master-1.x) (#24762) 2024-03-13 16:49:52 -04:00
Brandon Pfeifer 61f965a4b6
chore: use 'packager' and 'slack' images (#24742) 2024-03-12 15:26:11 -04:00
Brandon Pfeifer a688bdcf02
chore: upgrade to go1.21.6 (#24711) 2024-03-05 12:07:40 -05:00
Geoffrey Wossum ad7774df3e
fix: correct dependencies in package builds (1.11) (#24670) (#24675)
* chore: update ubuntu to 2204:current

* fix: install asciidoc with pip

(cherry picked from commit 70acbd58a8)
2024-02-16 17:09:24 -06:00
alespour 99a2261b9f
chore: upgrade golang 1.20.10 -> 1.20.13 (#24590) 2024-01-23 10:26:22 -06:00
Jack 6af0be9234
fix: panic index out of range for invalid series keys (#24565)
* chore: add scaffolding for naive solution

* feat: test case scaffolding

* fix: implement check for series key before proceeding

* fix: add validation for ReadSeriesKeyMeasurement usage

* refactor: explicit use of series key len

* feat: add remaining check to index

* feat: add check to remaining files

As the Len function is used as part of the parseSeriesKey, this also needs to be accounted for on the nil return from this function as it is used in different contexts

* feat: expand test cases

* chore: go fmt

* chore: update test failure message

* chore: impl feedback on unnecessary sz checks

* feat: expand test cases

* fix: nil series key check

In both sections for index.go there is a pre-existing length check against the series key which should catch invalid values, perhaps this explains why it hasn't cropped up in the reported panics. For even more safety, we can also skip a nil key because we know that subsequent calls will cause a panic where this key is attempted to be used

* fix: remove nil tags check

A key with no tags is valid, so we should not check for BOTH nil key and tags as a key could be nil, which is invalid, yet still have tags and therefore cause the check to pass which we do not want

* feat: extend test cases from feedback

* fix: extend checks for CompareSeriesKeys

* feat: add nilKeyHandler for shared key checking logic

* fix: logical error in nilKeyHandler

Prior to this, the else was always defaulted to at the end of the conditional branch, which causes unexpected behaviour and a failure of a bunch of tests.

* fix: return tags keep nil data

In a recent change to this, we agreed on a simple name == nil check for the actual data. As a follow on to this, I just realised that we don't actually want to nil back the tags, even if they're not checked, because having no tags is a valid input so we can simply return whatever we were passed unchanged.

* fix: use len == 0 for extra safety

* feat: extra test for blank series key
2024-01-23 09:44:29 +00: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
Jack 7dec23b411
docs: update contributing.md (#24561) 2024-01-09 21:16:03 +00: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 969abf3da2
fix: avoid SIGBUS when reading non-std series segment files (#24509)
Some series files which are smaller than the standard
sizes cause SIGBUS in influx_inspect and influxd, because
entry iteration walks onto mapped memory not backed by the
the file.  Avoid walking off the end of the file while
iterating series entries in oddly sized files.

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

Co-authored-by: Geoffrey Wossum <gwossum@influxdata.com>
2023-12-08 15:46:11 -08:00
alespour 5cbade5cd4
build(deps): upgrade flux to v0.194.4 (#24442)
* chore: update Go to 1.20

* build(deps): upgrade flux to v0.194.4
2023-11-03 08:17:38 -04:00
Brandon Pfeifer 7f68cd1e31
chore: upgrade golang 1.19.10 -> 1.20.10 (#24413) 2023-10-12 12:46:14 -04: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
Brandon Pfeifer 1b443ee5e7
chore: fix package permissions (1.x) (#24302)
* chore: replace "package builder" shell/docker implemention with python

* chore: remove unused packaging files
2023-06-26 12:23:14 -04:00
alespour ce06b39211
chore: upgrade to Go 1.19.10 (#24298) 2023-06-20 09:46:23 -05:00
Brandon Pfeifer 43c27f827f
chore: generate "influxdb.${CIRCLE_TAG}.digests" for each release (#24270) 2023-06-08 06:21:21 -04:00
Brandon Pfeifer 44d4b1e73c
fix: execute "compact-series-file" at startup (1.x) (#24260)
* chore: delete unused signing script

* fix: execute "compact-series-file" at startup

* fix: add "INFLUXD_OPTS" to "influxd config" line

* fix: use CONFIG to store influxd config path
2023-06-01 17:25:07 -04:00
davidby-influx 53856cdaae
fix: series file index compaction (#23916)
Series file indices monotonically grew even
when series were deleted.  Also stop 
ignoring error in series index recovery

Partially closes https://github.com/influxdata/EAR/issues/3643
2023-06-01 10:49:23 -07:00
Brandon Pfeifer ab85be01a2
chore: upgrade flux to v0.194.3 (#24254) 2023-05-30 19:02:29 -04:00
davidby-influx aad79e471f
fix: prevent world-writable MANIFEST files (#24235)
When a new MANIFEST file is created, set
its permissions to 644, not 666

closes https://github.com/influxdata/influxdb/issues/24233
2023-05-18 12:07:34 -07:00
Brandon Pfeifer f6c92680b0
chore: upgrade Flux v0.194.1 (#24211) 2023-04-19 15:55:56 -04:00
Brandon Pfeifer 55b650030c
chore: use remote package signing (#24205) 2023-04-18 22:22:09 -04:00
Jamie Strandboge 2a5a3e68da
chore: upgrade to Go 1.19.8 (#24198) 2023-04-12 15:56:37 -05: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
Jamie Strandboge bc07455a56
chore: update to go 1.19.6 (#24115) 2023-03-01 15:35:08 -06:00
Jeffrey Smith II 90c15ffd60
fix(security): bump several dependencies to fix security issues (#24108) 2023-02-27 17:16:49 -05:00
Jeffrey Smith II e1e894d28c
chore: go mod tidy (#24072) 2023-02-01 11:30:59 -05:00
Geoffrey Wossum 955f78a2cd
chore: eliminate use of `golang.org/x/crypto/ssh/terminal` package (#24036)
The CLI code used a single function from the `golang.org/x/crypto/ssh/terminal`
package (`terminal.IsTerminal`) which is just a wrapper around the
`golang.org/x/term` package's `term.IsTerminal` function. Replacing this
call prevents unnecessary and non-FIPS crypto functions from being pulled
into the binary.

closes: #24035
2023-01-12 17:19:34 -06:00
Jeffrey Smith II 88d2760bc8
feat: add the ability to log queries killed by `query-timeout` (#23978)
* feat: add the ability to log queries killed by `query-timeout`

* chore: update example config

* chore: improve logging details
2023-01-10 13:37:11 -05: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
davidby-influx 144aca1f7f
fix: support absolute file paths in check-schema (#23991)
Absolute file paths in influx_inspect check-schema
cause an 'Invalid Argument' error. This was caused
fs.WalkDir using fs.ValidPath. Replacing with
filepath.WalkDir permits absolute paths.

closes https://github.com/influxdata/influxdb/issues/23987
2022-12-19 12:59:56 -08:00
Jeffrey Smith II 657c2d7a2a
fix: add warning if fields.idxl is encountered (#23937) 2022-12-13 15:58:11 -05:00