Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/21065 #21066

Closed
wants to merge 299 commits into from
Closed

Bugfix/21065 #21066

wants to merge 299 commits into from

Conversation

hongjijun233
Copy link

Closes #21065

Describe your proposed changes here.

If there is an error in creating an Iterator, the input return by sg.CreateIterator(ctx, mm, opt) will be nil.

however, when close the Iterator, There is no operation to check the status, so there is a panic for close()

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • [ x ] Rebased/mergable
  • [ x ] Tests pass
  • [ x ] Sign CLA (if not already signed)

e-dard and others added 30 commits February 4, 2019 03:36
…ld-on-delete-when-series-still-in-cache

No rebuild series index on delete when the series still exists in cache
…snapshots

Fix compaction logic on infrequent cache snapshots
Scanner objects and iterators often need a ValuerEval. This
object is created, often with a function call, and has at
least one interface in it, so it allocates storage. Then it's
dropped again right away. The only part of it that might be
subject to change is usually a map. While the map's contents
change over time, the actual map doesn't change for the
lifetime of the object.

So, in both iterators and scanners, stash the ValuerEval
and continue reusing it. On a query returning a fair number
of data points, this produces a small (<5% in practice)
improvement in observed performance, visible as a significant
reduction in time spent in runtime (mallocgc, newobject,
etcetera).

The performance improvement isn't big, but it's reasonably
easy to evaluate it and establish that it's a safe change
to make.

Signed-off-by: seebs <seebs@seebs.net>
…er-reference

[BUG FIX] Fix nil pointer dereference at /api/v1/prom/read
…ull-compaction-1.8

Revert "Limit force-full and cold compaction size."
This commit changes `name`, `key`, and `value` to from `[]byte`
to `string`.
…ng-1.8

Convert TagValueSeriesIDCache to use string fields.
kevinhogan111 and others added 26 commits April 11, 2020 11:01
This commit changes the SeriesIDSet merge/union/intersect functions
to attach the underlying iterators as closers so that files can be
retained until the data is no longer in use. The roaring operations
can leave containers pointing at mmap data in the resulting bitmap
so we have to track underlying file usage until the data is finished
with.
…-iterator-merge-retention-1.8

fix(tsdb): Defer closing of underlying SeriesIDSetIterators
This commit changes `DefaultSeriesIDSetCacheSize` to zero so that the
tag value cache is disabled by default. There is a rare known bug where
the cache can cause a segfault which crasheds the process. The cache
is being disabled instead of removed as some users may still need the
cache for performance reasons.
…-series-id-cache-1.8

fix(tsdb): Disable series id set cache size by default.
)

Have AuthorizerIsOpen() assert if a given authizer has an
AuthorizeUnrestricted() method and if so, call that to provide the
result of AuthorizerIsOpen().

Otherwise we check if the supplied Authorizer is nil.

This preserves the fast-path for checking tag-level (and other) tsdb
operations.

This simplifies how we handle such authorizers by handling this case in
only one place.
…eld-iterator-planning-1.8

feat(query): Parallelize field iterator planning
…ropping-shard-1.8

fix(tsi1): wait deleting epoch before dropping shard
…tones-when-deleting-1.8

perf(tsi1): batch write tombstone entries when dropping/deleting
The buckets call had a column removed and the backport did not remove
that line. This modifies the buckets command to not append a row to a
column that no longer exists.
When applied this patch will:

* log snapshot directory removal errors

  Prior to this patch, errors when removing temporary snapshot
  directories happens silently.

  This patch ensures that errors are logged when os.RemoveAll() fails.

* refactor tsm1: Declare error value in condition

  Save a line of code and limits the scope of an error value.

* refactor tsm1: Add MakeSnapshotLinks()

  This commit adds (*FileStore).MakeSnapshotLinks().  The code in this
  function was originally part of CreateSnapshot().

  That code was hoisted out and into MakeSnapshotLinks() becuase there
  are two points of failure that require cleanup -- we have to delete a
  temporary directory on failure.

  Placing the code in one function allows us to check its returned error
  value and perform cleanup in only once place.

  In short, we hoisted code out of CreateSnapshot() to simplify error
  handling.

  On error, we remove any directories we created.
…e-errors-bp1.8

fix: gracefully handle errors when creating snapshots
This patch adds the [http.headers] subsection to the configuration file
that allows users to supply headers that will be returned in all HTTP
responses.

Applying this patch will:

* Add code to implement new configuration items.
* Add test to ensure configuration is properly parsed.
* Add test to ensure http response headers are set
* Update sample configuration file
…ttp-headers-bp1.8

feat(http): Allow user supplied HTTP headers
…-series-id-set-cache-size-1.8

fix(tsdb): Revert disable series id set cache size by default
@hongjijun233 hongjijun233 changed the base branch from 1.8.3 to master March 25, 2021 11:32
@hongjijun233 hongjijun233 changed the base branch from master to 1.8.3 March 25, 2021 11:33
@hongjijun233 hongjijun233 deleted the bugfix/21065 branch March 25, 2021 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.