Commit Graph

35310 Commits (ebb597d16cd83d50e04ca9e29b6fbdee816db73c)

Author SHA1 Message Date
davidby-influx ebb597d16c
fix: preserve time zone information in Task Scheduler (#25112)
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
2024-06-27 16:14:45 -07:00
peterbarnett03 8cb6b54b2b
chore: Update README to approved version. (#25103)
* chore: Update README to approved version.

* chore: README adjustments

---------

Co-authored-by: Peter Barnett <peterbarnett@Peters-MacBook-Pro.local>
2024-06-27 12:50:21 -04:00
davidby-influx 0c77b4cbd2
fix: GROUP BY queries with offset that crosses a DST boundary fail. (#25082) (#25087)
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
2024-06-24 13:40:04 -07:00
Geoffrey Wossum cb8cfe3510
fix: prevent retention service from hanging (#25077)
* fix: prevent retention service from hanging (#25055)

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: #25076
(cherry picked from commit b4bd607eef)
2024-06-24 12:27:22 -05:00
Geoffrey Wossum 9fd91a554d
feat: disable file:// urls when hardening enabled (#24858)
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.
2024-06-17 17:33:48 -05:00
Martin Hilton f4ef091f50
build(flux): update flux to v0.195.1 (#25052) 2024-06-12 05:52:17 +01:00
Martin Hilton fd0531761c
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.
2024-06-11 05:49:52 +01:00
davidby-influx a97566bc31
fix: return MergeIterator.Close errors (#24975) (#24997)
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
2024-05-13 18:26:15 -07:00
davidby-influx 0a4d41bc90
fix: ensure TSMBatchKeyIterator and FileStore close all TSMReaders (#24957) (#24964)
Do not let errors on closing
a TSMReader prevent other
closes.

(cherry picked from commit 82cbdb5478)

closes https://github.com/influxdata/influxdb/issues/24961
2024-05-06 10:45:41 -07:00
davidby-influx 73f694ac3c
chore: update google.golang.org/protobuf to 1.33.0 (#24940)
* chore: update google.golang.org/protobuf to 1.33.0

closes https://github.com/influxdata/edge/issues/627

* chore: update protoc
2024-05-01 10:16:23 -04:00
Jamie Strandboge 4a5c1cf52c
chore: update golang.org/x/net to v0.23.0 (#24928)
Performed:
$ go mod edit golang.org/x/net@v0.23.0
$ go mod tidy
2024-04-19 12:12:37 -05:00
Brandon Pfeifer c165f2d427
chore: upgrade go toolchain to 1.21.9 (#24910) 2024-04-12 15:02:56 -04:00
Phil Bracikowski 2e458963f2
fix(meta.Client): add write lock to Load method ok kv store client (#24896)
This adds locking to the load method and renames it to Reload(). This
method replaces the cached data from the underlying kv.Store and needs a
write lock. The restore api uses it and may have been an issue with
concurrent writes into the cached data during a restore.

* fixes #24895
2024-04-10 11:14:20 -07:00
davidby-influx 31753c3c9e
fix: additional constant time code (#24887)
closes https://github.com/influxdata/influxdb/issues/24886
2024-04-04 19:58:29 -07:00
davidby-influx 7d8884beca
feat: add optional stricter password requirements (#24857)
Allow password length and character class checking.

closes https://github.com/influxdata/influxdb/issues/24856
2024-04-04 12:27:58 -07:00
davidby-influx 49d0bef3ea
fix: return and respect cursor errors (#24791) (#24846)
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
2024-03-26 14:54:32 -07:00
davidby-influx 2066c4be46
fix: improved shard deletion (#24602) (#24844)
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
2024-03-26 14:18:08 -07:00
davidby-influx 82dc3430b8
fix: do not panic when empty tags are queried (#24784) (#24786)
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 22:03:27 -07:00
Brandon Pfeifer 1baa393f69
chore: use external "ci-packager" and "ci-slack" image (#24699) 2024-03-12 15:25:59 -04:00
Jakub Bednář 80488919a5
chore: upgrade to go 1.21.8 (main-2.x) (#24757)
* chore: upgrade to go 1.21.8 (main-2.x)

* chore(ci): update PyYAML to compatible version with latest cython https://github.com/yaml/pyyaml/issues/601
2024-03-12 13:11:39 -04:00
Brandon Pfeifer 88345c3e9d
chore: upgrade to go 1.21.6 (main-2.x) (#24709)
* chore: upgrade to go1.21.6

* fix: update deprecated test apparatus
2024-03-05 12:58:59 -05:00
Jamie Strandboge 02156eaf3f
fix: update logrus to 1.9.3 (#24716)
Closes #24708
2024-02-29 14:23:01 -06:00
Phil Bracikowski 5d801119c5
feat(tsm1/wal): encapsulate expiring WAL files in FileDisposer (#24611)
* feat(tsm1/wal): encapsulate expiring WAL files in FileDisposer

This changeset introduces an interface extension point named
FileDisposer to control what to do with WAL files when they are no
longer needed. Currently, the only implementation is to delete the file
which is the existing behavior.

* chore: accumulate errors

Since we're here, capture the previously ignored fs errors and pass up a
combined error (which the only callers log out).
2024-01-31 12:46:46 -08:00
Brandon Pfeifer afd7ced0c5
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.
2024-01-31 14:24:30 -05:00
Phil Bracikowski 713efbc164
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.
2024-01-30 20:01:20 -08:00
Jack 976ef20a32
fix: panic index out of range for invalid series keys [Port to main-2.x] (#24597)
* fix: cherry-pick to main-2.x
2024-01-23 17:09:10 +00:00
davidby-influx 0dc48b1260
fix: prevent retention service creating orphaned shard files (#24530) (#24547)
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>
2024-01-04 16:56:56 -08:00
davidby-influx a3fd489864
fix: corrrectly return 4XX errors instead of 5XX errors (#24519)
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
2023-12-27 08:21:09 -08:00
davidby-influx 8e8700f14f
fix: enable Secure when using TLS and enable HttpOnly (#24524)
Set the HttpOnly and, when TLS is enabled, 
Secure flags on cookies

closes: https://github.com/influxdata/influxdb/issues/24522
2023-12-20 11:48:24 -08:00
davidby-influx 081f95147e
fix: avoid SIGBUS when reading non-std series segment files (#24509) (#24520)
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>
(cherry picked from commit 969abf3da2)

closes https://github.com/influxdata/influxdb/issues/24511
2023-12-19 15:02:34 -08:00
Martin Hilton 924735a96d
build(flux): update flux to v0.194.5 (#24477) 2023-12-04 08:35:13 +00:00
davidby-influx 0ccd35c253
feat: write detailed logs from EDR failures (#24496)
To assist debugging of write failures
in Edge Data Replication, do not
write only the HTTP status code to
the log. Also include any messages
returned by the write recipient.

closes https://github.com/influxdata/influxdb/issues/24481
2023-11-30 11:31:53 -08:00
davidby-influx 13cf6be49e
feat: Add authenticating ID and user ID to request logging (#24474)
To allow rudimentary security auditing of logs,
add the authenticating ID and the user ID when
possible to the request logs. When a request is
authorized for V1 or V2 API, store the authorizer
object to be used by the logger up the call stack.

closes https://github.com/influxdata/influxdb/issues/24473
2023-11-22 12:28:58 -08:00
davidby-influx 4cd5e765b8
fix: handle MetricSlice to Points conversion errors (#24452) (#24453)
Correctly handle errors in converting MetricSlice
elements into model.Points. Add a test to verify
error handling.

(cherry picked from commit 19e5c0e1b7)
2023-11-08 09:19:50 -08:00
Martin Hilton 08b4361b36
build(deps): upgrade flux to v0.194.4 (#24431)
Update the flux version to v0.194.4.
2023-10-26 18:16:15 +01:00
Brandon Pfeifer 39012a8ed5
chore: upgrade golang 1.20.5 -> 1.20.10 (#24415) 2023-10-12 12:46:44 -04:00
Jeffrey Smith II 8576cad9e5 chore: rename master to main-2.x 2023-09-20 16:49:45 -04:00
Brandon Pfeifer b3b982d746
chore: update MacOS executor to M1 (#24372) 2023-09-20 14:30:21 -04:00
Brandon Pfeifer 75a8bcfae2
chore: replace "package builder" shell implemention with python (#24306) 2023-06-30 10:45:03 -04:00
Jeffrey Smith II a6bb6a85d6
fix: update ui to remove new data explorer (#24220) 2023-06-29 15:34:23 -04:00
alespour cc62221501
chore: upgrade to Go 1.20.5 (#24299) 2023-06-20 09:32:44 -05:00
cui fliter 46ec649b9c
chore: fix function name in comment (#24281) 2023-06-14 11:18:13 -04:00
Brandon Pfeifer 3dabfcdd08
fix: correct CHANGELOG.md upload destination (#24287)
This updates the job logic so that workflow condition is evaluated
by CircleCI rather than the shell. This also uses the "aws-s3" orb
for uploading to S3 (rather than awscli).
2023-06-13 20:00:45 -04:00
Brandon Pfeifer b352a179a2
fix: update terraform with newer version (#24284)
The terraform shipped with snap (in the older version of Ubuntu)
only supported public key encryption with ssh-rsa. New versions
of Linux started deprecating ssh-rsa, so this version bump
is required.
2023-06-13 16:55:37 -04:00
Brandon Pfeifer 2f3733c2cb
chore: generate "influxdb2.${CIRCLE_TAG}.digests" for each release (#24276) 2023-06-13 11:37:58 -04:00
Jeffrey Smith II 6219f98e1c
chore: Update the go version required (#24217) 2023-05-30 18:00:08 -04:00
Christopher M. Wolff 4acc733019
build(flux): update flux to v0.194.3 (#24252) 2023-05-30 14:21:20 -07:00
Brandon Pfeifer ba7f1a7ab6
chore: upgrade changelogger to latest version (#24244)
This allows changelogs to be built from "non-release" tags. These
changelogs use "UNRELEASED" as the first section header. Commits
from these sections are eventually rolled into a proper "release"
tag (e.g v2.7.0).
2023-05-26 12:09:44 -04:00
dependabot[bot] 398660438f
build(deps): bump github.com/docker/distribution (#24230)
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 15:03:30 -05:00
Christopher M. Wolff 3eb091d2e7
build(flux): update flux to v0.194.1 (#24203) 2023-04-17 15:09:43 -07:00