This commit adds a field to Batcher to configure the maximum allowed
line length. If this value is non-zero, the bufio.Scanner buffer
will be configured scan lines up to this length. If a line exceeds
this length an ErrLineToLong error will be returned.
Simplified TestBatcher_read tests and added a test case for this
new scenario and to ensure lines exceeding the default
bufio.MaxScanTokenSize are allowed.
A fairly minor change, but this saves two allocations every time
points are written to the API (one allocation for the embedded io.LimitReader,
and one allocation to create the `close` closure).
Also fix the code so that it actually limits to the exact requested number of bytes
rather than one more. We don't really need to layer on top of io.LimitReader,
as that code is fairly minimal.
This is a backport of #14262 to the 1.x storage engine. The 1.x storage
engine is now the primary engine for open source so when we switched we
regressed to the old behavior.
This also fixes `go generate` for the tsm1 package by running `tmpl`
with `go run` instead of assuming the correct one is installed in the
path.
This commit removes incorrect implementations of the `DeleteBucket`
and `DeleteBucketRangePredicate` APIs from the storage package,
which remained after the transition to the tsdb 1.x storage engine.
Secondly, this PR utilizes the `ENotImplemented` error code to inform
users which call the `/api/v2/delete`
* chore: update circleci config to use golang:1.15 images
* fix: Update Go version and use temporary override for Arrow
The Arrow override is to fix race detection problem. Once the
Arrow PR merges, this override can be removed.
Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
* feat(pkger): add ability to export dashboards by name
* chore: cleanup types
* chore: actually restrict exported dashboards to specified name
* feat: export buckets by name
* feat: export checks by name
* feat: export labels by name
* feat: export notification endpoints by name
* feat: export notification rules by name
* feat: export tasks by name
* feat: export telegraf configs by name
* feat: export variables by name
* chore: remove name from service clone org resources
these functions are not hit by the cli
* chore: update old tests and add new tests
* chore: revert notificationEndpoints to be name unique
* chore: address feedback
* chore: define template export by name in swagger
* chore: proper swagger syntax
* chore: remove crufty comments
* chore: fix typo in cli flag
* chore: update changelog
nightly selenium tests were failing to run due to chromedriver only supporting chrome 83. somewhere a docker image was updated where that version got bumped. this update allows the tests to run.
A bucket is represented as a single database and retention policy and
therefore `DeleteDatabase` is the appropriate API to remove a bucket
from TSDB.
Fixes#19600
This is required to keep the system resources low when running
the Flux end-to-end tests, which create a bucket for each test. A
bucket creates at least 17 files after the first write:
* 8 for the `_series` segment files
* 8 for the `index` log files
* 1 for the `wal`