* TSI index should compact old or too-large log files
* Old tsl files should be compacted without new writes
* Add extra logging when disk size test fails
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
When using queries like 'select count(_seriesKey) from bigmeasurement`, we
should iterate over the tsi structures to serve the query instead of loading
all the series into memory up front.
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
When the compaction planner runs, if it cannot acquire
a lock on the files it plans to compact, it returns a
nil list of compaction groups. This, in turn, sets the
engine statistics for compactions queues to zero,
which is incorrect. Instead, use the length of pending
files which would have been returned.
closes https://github.com/influxdata/influxdb/issues/22138
(cherry picked from commit 7d3efe1e9e)
closes https://github.com/influxdata/influxdb/issues/22141
* fix: systemd service -- handle 40x and block indefinitely
* chore: update changelog
* chore: add pkg_run_test to CI
* chore: fix curl syntax for auth setup in pkg_run_test
This fix ensures that memory-mapped files are not released
before pointers into them are copied into heap memory.
MeasurementNamesByExpr() and MeasurementNamesByPredicate() can
cause panics by copying memory from mmapped files that have been
released. The functions they call use iterators to files which
are closed (releasing the mmapped files) before the memory is
safely copied to the heap.
closes https://github.com/influxdata/influxdb/issues/22000
(cherry picked from commit a989f8f8b6)
closes https://github.com/influxdata/influxdb/issues/22002
* fix: field metaqueries take fast path if predicate is only on `_measurement`
* chore: update CHANGELOG
* test: add test for fields with measurement predicate
* feat: record telemetry data only on successful response codes
* feat: re-write request path in file handler
* fix: use a slug for the replacement path
* chore: update CHANGELOG
* fix: report for 5XX also
* fix: address review comments
* feat: port influxd inspect build-tsi
* refactor: changes based on code review, not including logging changes
* refactor: improved logging based on code review
* chore: updated CHANGELOG.md
Co-authored-by: Michelle McFarland <michellemcfarland@Michelles-MacBook-Pro.local>
CVE-2020-26160[0] is an access restriction bypass under certain
circumstances when validating audience checks. The original
dgrijalva/jwt-go project is no longer maintained[1] and will not be
issuing a fix for this CVE[2]. Instead, they have transferred ownership
to golang-jwt/jwt[2][3][4].
The following was performed:
1. update chronograf and jsonweb to import golang-jwt/jwt
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
5. make
6. make test
References:
[0] https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26160
[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
* feat: porting influxd inspect dump-wal from 1.x
* refactor: adapted 1.x logic to cobra command syntax
* refactor: improved clarity of printed output and help documentation
* chore: ran make fmt
* chore: updated CHANGELOG.md
* refactor: made small changes suggested in code review
* feat: port influxd inspect report-tsi
* chore: restored tsi1.IsIndexDir() functionality
* refactor: changed inspect report-tsi to work with 2.x file system structure
* chore: fixed output tab alignment
* chore: ran make fmt
* chore: ran make fmt on changed file after resolving merge conflicts
* refactor: made changes based on code review
* refactor: avoiding defer build-up in loop
* refactor: replaced path with filepath and added shardIdx closures
* chore: updated changelog
* refactor: handled shardIdx closures in error case
Co-authored-by: Michelle McFarland <michellemcfarland@Michelles-MacBook-Pro.local>
* feat: migration for operator token to include permissions for annotations and notebooks
* feat: run migrations for restored dbs
* chore: cleanup go.mod
* chore: better description comment for migration
* fix: fixed cursor return condition
* fix: hard code the list of old operator permissions
* feat: run migrations prior to swapping restored dbs
* fix: fix the sqlite migrator
* chore: update CHANGELOG
This differs from the 1.x implementation as the blocks and index in-depth printout will now only happen if explicitly stated, instead of being printed with filterKey set
* feat: port tsm-inspect command to dbv2
* test: add test code for tsm-verify
* chore: delete old tsm-verify code stubs
* docs: update changelog
* chore: test for broken checksums more thoroughly