Commit Graph

35326 Commits (db/update-flux-version)

Author SHA1 Message Date
WeblWabl 13b9647fd2 feat: Use ldext in build-test.sh (#26082)
* feat: Use ldext in build-test.sh

* feat: use env vars

* feat: re-add ./... to go-test-compile

* chore: update cross-builder tag

* chore: change cross builder tag to deb10f07f31767ee55b0b5f87edd34635673cf41

* chore: use latest instead of tag

* feat: run ci

* feat: typo in build-tests.sh

(cherry picked from commit cb5072ce33)
2025-05-09 10:33:52 -05:00
WeblWabl c00b816f2a feat: update crossbuilder to tagged version and update go linker (#26064)
* feat: update crossbuilder and ldflags for go

* feat: Update build_windows for build-tests script
this includes a CGO_LDFLAGS env var when running go-test-compile

(cherry picked from commit 4689f21687)
2025-05-09 10:32:27 -05:00
WeblWabl 0c5963a5bd feat: update protos for main-2x (#26059)
* feat: update protos
This PR updates the proto files to use protoc-gen-go v1.34.1
and protoc to use v5.29.2

* feat: update makefile target to use v1.34.1 of protoc-gen-go

(cherry picked from commit 26170d4e57)
2025-05-09 10:25:57 -05:00
Martin Hilton 3b6a3a30ec build(flux): update flux to v0.196.1 (#26037)
(cherry picked from commit a48adbbad7)
2025-05-09 10:25:41 -05:00
WeblWabl 68534d3ff2
feat: upgrade go to 1.23.5 (#25925) (#25928)
* feat: This PR updates the go toolchain from 1.22.11 to 1.23.5

(cherry picked from commit 73722a5b66)
2025-01-28 13:46:01 -06:00
Jamie Strandboge 1f9b96d61e
chore: upgrade go toolchain to 1.22.11 (#25921) 2025-01-27 11:39:17 -06:00
Devan fbf5d4ab5e feat: Merge branch '2.7' of github.com:influxdata/influxdb into 2.7 2024-11-26 12:06:07 -06:00
WeblWabl e3265b340d
feat: Upgrade go to 1.22.7 (#25586) (#25588)
* feat: Upgrade go to 1.22.7

(cherry picked from commit 514e24752c)
2024-11-22 17:26:11 -06:00
WeblWabl 1b1f04389f feat: Upgrade go to 1.22.7 (#25586)
* feat: Upgrade go to 1.22.7

(cherry picked from commit 514e24752c)
2024-11-22 16:50:51 -06:00
WeblWabl aae512339d
feat(buildtsi): Adds log for rebuild TSI completion (#25576) (#25577)
(cherry-picked from 75eb209f72)

closes https://github.com/influxdata/feature-requests/issues/612

(cherry picked from commit edbb55777e)
2024-11-21 16:53:36 -06:00
Geoffrey Wossum 78e1d77a80
feat: check for uncommitted WRR segments during startup (#25560)
Check for uncommitted WRR segments during startup and abort startup
if found.

Closes: #25559
(cherry picked from commit 037c6af6e8)
2024-11-18 09:41:40 -06:00
Geoffrey Wossum 941a41bbef
chore: loadShards changes to more cleanly support 2.x feature (#25556)
* chore: loadShards changes to more cleanly support 2.x feature (#25513)

* chore: move shardID parsing and shard filtering into walkShardsAndProcess

* chore: make it impossible to miss sending shardResponse or marking shard as complete

* chore: always count number of shards (preparation for 2.x related feature)

* chore: explicitly load series files and create indices serially

Explicitly load series files and create indices serially. Also
avoid passing them to work functions that don't need them.

* chore: rework loadShards for changes necessary to cancel loading process

* chore: comment improvements

* fix: fix race conditions in TestStore_StartupShardProgress and TestStore_BadShardLoading

* chore: avoid logging nil error

* chore: refactor shard loading and shard walking

Refactor loadShards and CreateShard to use a common shardLoader class that
makes thread-safety easier. Refactor walkShardsAndProcess into findShards.

* chore: improve comment

* chore: rename OpenShard to ReopenShard and implement with shardLoader

Rename Store.OpenShard to Store.ReopenShard and implement using a
shardLoader object. Changes to tests as necessary.

* chore: avoid resetting shard options and locking on Reopen

Avoid resetting shard options when reopening a shard.
Proper mutex locker in Shard.ReopenShard.

* chore: fix formatting issue

* chore: warn on mixed index types in Store.CreateShard

* chore: change from info to warn when invalid shard IDs found in path

* chore: use coarser locking in Store.ReopenShard

* chore: fix typo in comment

* chore: code simplification

(cherry picked from commit 0bc167bbd7)

* chore: fix logging issues in Store.loadShards

Fix reporting shards not opening correctly when they actually did.
Fix race condition with logging in loadShards.

(cherry picked from commit 65683bf166)

* chore: remove unnecessary fmt.Sprintf calls

Remove unnecessary fmt.Sprintf calls for static code checks in main-2.x.

(cherry picked from commit 8497fbf0af)

* chore: remove unnecessary blank identifier

* chore: remove unnecessary blank identifier

(cherry picked from commit 5c7479eb14)

Closes: #25555
2024-11-15 16:32:15 -06:00
WeblWabl 900e44d8f0
feat(logging): Add startup logging for shard counts (#25378) (#25507) (#25509) 2024-11-01 16:39:04 -05:00
Geoffrey Wossum f3d5325d78
chore: upgrade ui assets package to 2.7.10 (#25505)
Upgrade UI assets package to OSS 2.7.10.

Closes: #25504
(cherry picked from commit 9d9e92c67d)
2024-10-30 14:40:14 -05:00
Geoffrey Wossum e9ea8cfb31
feat: add `--pid-file` option to write PID files (#25499)
Add `--pid-file` option to write PID files on startup. The PID filename
is specified by the argument after `--pid-file`. If the PID file already exists, influxd will exit unless the `--overwrite-pid-file` flag is also used.

Example: `influxd --pid-file /var/lib/influxd/influxd.pid`

PID files are automatically removed when the influxd process is shutdown.

Closes: #25498
(cherry picked from commit c35321b470)
(cherry picked from commit 48f760065b)
2024-10-29 16:10:32 -05:00
Geoffrey Wossum 981f2fc63d
feat: add option to flush WAL on shutdown (#25452)
Add `--storage-wal-flush-on-shutdown` to flush WAL on database shutdown.
On successful shutdown, all WAL data will be committed to TSM files and the
WAL directories will not contain any .wal files.

Clean cherry-pick of #25444 from main-2.x.

Closes: #25422
(cherry picked from commit 96bade409e)
2024-10-15 15:43:21 -05:00
Geoffrey Wossum 7483bea8e9
chore: replace uses of %v with %w (#25400)
Replace uses of `%v` with `%w` where appropriate in file_store.go

Closes: #25399
(cherry picked from commit 60e49d854c)
2024-09-26 13:19:41 -05:00
Geoffrey Wossum 93d6ffc21c
fix: do not rename files on mmap failure (#25356)
If NewTSMReader() fails because mmap fails, do not
rename the file, because the error is probably
caused by vm.max_map_count being too low

Closes: #25351

(cherry picked from commit 5aff511e40)
2024-09-24 16:27:19 -05:00
WeblWabl 07df053ce2
fix(tsi1/partition/test): fix data races in test code (#57) (#25338) … (#25352)
* fix(tsi1/partition/test): fix data races in test code (#57)

* fix(tsi1/partition/test): fix data races in test code

This PR is like #24613 but solves it with a setter
method for MaxLogFileSize which allows unexporting that value and
MaxLogFileAge. There are actually two places locks were needed in test
code. The behavior of production code is unchanged.

(cherry picked from commit f0235c4daf4b97769db932f7346c1d3aecf57f8f)

* feat: modify error handling to be more idiomatic

closes #24042

* fix: errors.Join() filters nil errors

closes #25341
---------

Co-authored-by: Phil Bracikowski <13472206+philjb@users.noreply.github.com>
(cherry picked from commit 5c9e45f)
(cherry picked from commit b88e74e)

closes #25342
2024-09-17 14:25:01 -05:00
Geoffrey Wossum cc9bd41bf2
chore: improve error messages and logging during shard opening (#25333)
Backport from main-2.x.

(cherry picked from commit da9615fdc3)

Closes: #25332
2024-09-16 11:17:34 -05:00
davidby-influx 46086c8de5
fix: add additional logging on loading fields.idxl files (#25309) (#25319) (#25324)
Log the path of the file being loaded, and when level=debug
log progress for each set of field changes

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

(cherry picked from commit 5d8d1120e1)

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

(cherry picked from commit 96c97a76f4)

closes https://github.com/influxdata/influxdb/issues/25313
2024-09-12 16:12:46 -07:00
Geoffrey Wossum f302d9730c
build(flux): update flux to v0.195.2 (#25248)
(cherry picked from commit 9b19ca7714)
2024-08-15 12:32:05 -05:00
Joshua Powers 91c1a5d3d8
fix: Update UI to v2.7.9 (#25232)
* fix: Update UI to 2.7.9

Pulls in UI 2.7.9 which is based off of the releases/OSS branch, not master. Includes only the one commit to update the templates.

* chore(ui): Update fetch-ui-assets.sh
2024-08-09 13:22:19 -04:00
Orgad Shaneh 1ff55ea4ac
chore: upgrade go toolchain to 1.21.12 (#25177)
Fixes CVE-2024-24790, reported by X-Ray.
2024-07-26 18:31:31 -05:00
Brandon Pfeifer 18c989726c
chore(ui): bump release to OSS-2.7.8 (#25191) 2024-07-25 10:08:54 -04:00
davidby-influx 9c8f2968f3
fix: Store.validateArgs wrongfully overwriting start, end unix time (#25146) (#25163)
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>
(cherry picked from commit c2b3e38a38)

closes https://github.com/influxdata/influxdb/issues/25148
2024-07-16 08:37:40 -07:00
davidby-influx 8e0d754c1e
fix: prevent an infinite loop in measurementFieldSetChangeMgr (#25155) (#25156) (#25164)
The measurementFieldSetChangeMgr has a possibly infinite loop
if the writeRequests channel is closed while in the inner
loop to consolidate write requests. We need to check for ok
on channel receive and exit the loop when ok is false.

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

(cherry picked from commit 176fca2138)

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

(cherry picked from commit 031f394d2c)

closes https://github.com/influxdata/influxdb/issues/25154
2024-07-16 08:36:52 -07:00
Geoffrey Wossum e9e0f744fa
fix: prevent retention service from hanging (#25121)
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.

This is a port of ad68ec8 from master-1.x to main-2.x.

closes: #25118
(cherry picked from commit b4bd607eef)
(cherry picked from commit cb8cfe3510)
2024-07-01 14:43:20 -05:00
davidby-influx 0b7cd24e24
fix: preserve time zone information in Task Scheduler (#25112) (#25113)
Avoid converting times to int64 in the Task Scheduler
to preserve time zone information. This corrects a
failure after fall back time changes which halts
every-type tasks

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

(cherry picked from commit ebb597d16c)

closes https://github.com/influxdata/influxdb/issues/25111
2024-06-28 09:09:43 -07:00
Jamie Strandboge 26db97e260
chore: upgrade go toolchain to 1.21.10 (#25115) 2024-06-28 10:24:19 -05:00
davidby-influx 3e756c6bbd
fix: GROUP BY queries with offset that crosses a DST boundary fail. (#25082) (#25087) (#25089)
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

(cherry picked from commit d60741b506)

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

(cherry picked from commit 0c77b4cbd2)

closes https://github.com/influxdata/influxdb/issues/25081
2024-06-25 11:33:02 -07:00
Geoffrey Wossum 852a03d0e9
feat: disable file:// urls when hardening enabled (#25069)
Stacks and templates allow specifying file:// URLs. Add command line
option `--template-file-urls-disabled` to disable their use for people who don't require them.

Closes: #25068
(cherry picked from commit 9fd91a554d)
2024-06-17 18:38:07 -05:00
Geoffrey Wossum c6c00b8eea
build(flux): update flux to v0.195.1 (#25060)
* feat: update flux to latest head (#25051)

* feat: update flux to latest head

Flux has updated some dependencies, including prometheus. Prometheus
has changed in some incompatible ways. Update the flux dependency
to a newer version with the updated prometheus dependency and apply
some small fixes to make everything build. This is in preparation
for a flux release later in the week.

The biggest change is in some tests that were using runtime.DeepEqual
to check the correctness of prometheus metrics. The internals of
these types have changed such that this is not a safe thing to do
anymore. The test now verifies the string representations, as
produced by String(), match.

* fix: update CI script

The scripts/ci/check-system-go-matches-go-mod.sh is failing because
newer go toolchains include the bugfix version in go.mod's go
directive. Update the script to check the major and minor versions
reported by both tools match.

(cherry picked from commit fd0531761c)

* build(flux): update flux to v0.195.1 (#25052)

(cherry picked from commit f4ef091f50)
2024-06-13 11:10:23 -05:00
davidby-influx 00b688888a
fix: return MergeIterator.Close errors (#24975) (#24997) (#24998)
Ensure that errors from closing the
iterators underneath a MergeIterator
are returned up the stack.

(cherry picked from commit 5fda409f39)

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

(cherry picked from commit a97566bc31)

closes https://github.com/influxdata/influxdb/issues/24978
2024-05-14 12:32:40 -07:00
Jamie Strandboge bc42088131
fix: update logrus to 1.9.3 (#24970) 2024-05-07 11:18:37 -05:00
davidby-influx 6ac3343eb8
fix: ensure TSMBatchKeyIterator and FileStore close all TSMReaders (#24957) (#24964) (#24965)
Do not let errors on closing
a TSMReader prevent other
closes.

(cherry picked from commit 82cbdb5478)

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

(cherry picked from commit 0a4d41bc90)

closes https://github.com/influxdata/influxdb/issues/24962
2024-05-06 13:58:37 -07:00
Brandon Pfeifer 9cec3d018e
chore: upgrade protocol buffers to v5.26.1 (#24952) 2024-05-01 11:08:09 -07:00
Jamie Strandboge 46d9540d34
chore: update golang.org/x/net to v0.23.0 (2.7) (#24929)
Performed:
$ go mod edit golang.org/x/net@v0.23.0
$ go mod tidy
2024-04-19 12:12:46 -05:00
Brandon Pfeifer 3c58c06206
chore: upgrade go toolchain to 1.21.9 (#24911) 2024-04-12 15:32:40 -04:00
davidby-influx 8bc5cee7fe
fix: additional constant time code (#24887) (#24898)
closes https://github.com/influxdata/influxdb/issues/24886

(cherry picked from commit 31753c3c9e)

closes https://github.com/influxdata/influxdb/issues/24888
2024-04-05 16:33:17 -07:00
davidby-influx 6c41e979b5
feat: add optional stricter password requirements (#24857) (#24890)
Allow password length and character class checking.

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

(cherry picked from commit 7d8884beca)

closes https://github.com/influxdata/influxdb/issues/24884
2024-04-05 15:42:37 -07:00
davidby-influx 8f09e3684a
fix: return and respect cursor errors (#24791) (#24846) (#24847)
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>

(cherry picked from commit fe6c64b21e)

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

(cherry picked from commit 49d0bef3ea)

closes https://github.com/influxdata/influxdb/issues/24826
2024-03-27 14:16:40 -07:00
davidby-influx d2af577adf
fix: improved shard deletion (#24602) (#24844) (#24848)
Avoid unnecessarily deleting series from the series file
Log all errors on shard deletion

Closes https://github.com/influxdata/influxdb/issues/24834

(cherry picked from commit 8ff06d5a92)

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

(cherry picked from commit 2066c4be46)

closes https://github.com/influxdata/influxdb/issues/24837
2024-03-27 14:12:30 -07:00
davidby-influx e4fba98c6b
fix: do not panic when empty tags are queried (#24784) (#24787)
Do not panic if a cursor array is nil and the number
of timestamps is retrieved.

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

(cherry picked from commit bc80e881fa)
2024-03-18 21:57:39 -07:00
Jakub Bednář b2d348cda8
chore: upgrade to go 1.21.8 (2.7) (#24758)
* chore: upgrade to go 1.21.8 (2.7)

* chore(ci): update PyYAML to compatible version with latest cython https://github.com/yaml/pyyaml/issues/601
2024-03-12 13:12:02 -04:00
Brandon Pfeifer 571b552ac8
chore: upgrade to go 1.21.6 (2.7) (#24710)
* chore: upgrade to go1.21.6

* fix: update deprecated test apparatus
2024-03-05 12:08:08 -05:00
Brandon Pfeifer 2a062608ae
fix: update broken flux and perf tests (2.7) (#24619)
* fix: update broken flux and perf tests (main-2.x) (#24617)

* chore: download repository key to file

* fix: broken perf tests

Some perf tests had to be temporarily disabled. Work is
needed in the pref_tests repositories to make them work
again.

* fix(tsi1/partition/test): fix data race in test code (#24613)

* fix(tsi1/partition/test): fix data race in test code

TestPartition_Compact_Write_Fail test was not locking the partition
before changing the value of MaxLogFileSize. This PR exports the mutex
of the partition to allow the test to access it and lock. Alternatives
require more changes such as a Setter method if we need to hide the
mutex.

* fixes #24042, for #24040

* chore: complete renaming of mutex in file and fix flux test

The flux test is another failing test because it was using a relative
time range.

---------

Co-authored-by: Phil Bracikowski <13472206+philjb@users.noreply.github.com>
2024-01-31 15:46:53 -05:00
Jack bfb09aadac
fix: panic index out of range for invalid series keys [Port to 2.7] (#24599) 2024-01-23 17:08:07 +00:00
davidby-influx 09a9607fd9
fix: prevent retention service creating orphaned shard files (#24530) (#24547) (#24548)
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
(cherry picked from commit 7bd3f89d18)
closes https://github.com/influxdata/influxdb/issues/24545

Co-authored-by: Geoffrey Wossum <gwossum@influxdata.com>
(cherry picked from commit 0dc48b1260)
closes https://github.com/influxdata/influxdb/issues/24546
2024-01-05 08:21:16 -08:00
davidby-influx c169e98f30
fix: corrrectly return 4XX errors instead of 5XX errors (#24519) (#24534)
HTTP 5XX errors were being returned incorrectly from
BoltDB errors that were actually bad requests, e.g.,
names that were too long for buckets, users, and
organizations. Map BoltDB errors to correct Influx
errors and return 4XX errors where appropriate. Also
add op codes to more errors

(cherry picked from commit a3fd489864)
2023-12-28 09:03:37 -08:00