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

Remove leftover .tmp folders after backup/snapshot #18326

Closed
wants to merge 282 commits into from

Conversation

ydkn
Copy link

@ydkn ydkn commented Jun 2, 2020

Closes #16289

When creating a backup on an installation with a large database the leftover .tmp folders created during the backup/snapshot will fill up the disk. See #16289 for details.
This PR will cleanup the leftover .tmp folders if there is no concurrent backup/snapshot running.

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Well-formatted commit messages
  • Rebased/mergeable
  • Tests pass
  • http/swagger.yml updated (if modified Go structs or API)
  • Documentation updated or issue created (provide link to issue/pr)
  • Signed CLA (if not already signed)

e-dard and others added 30 commits January 28, 2019 11:55
Remove copy-on-write when caching bitmaps
Fix bug with incorrect ABS results for negative integer values
Fix linting errors in the errlist package
…ervices_graphite

Fix golint warnings for services/graphite
to fix the dead link to InfluxQL in the PR template
Fix misspelling identified by misspell
…ld-on-delete-without-overlap-timerange

Do not rebuild series index on delete for series not overlapping in time
improve error handling of PointsWriter.writeToShard
…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>
jsternberg and others added 25 commits March 20, 2020 09:23
…17359)

The storage read service would return a nil cursor if there was no data
and no shards to read from. This modifies it to return an empty cursor
instead.
…xdata#17196)

* fix(query): use query dialect annotations specified in request

Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>

* chore(query): add tests

Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
…safe-marshalling-1.8

fix(tsdb): Revert "fix: remove some unsafe marshalling to reduce risk of segfault"
…nfluxdata#17570)

fixes influxdata#17440

While encoding or decoding corrupt data, the current behaviour is to `panic`.
This commit replaces the `panic` with `error` to be propagated up to the calling `iterator`.
To avoid overwriting other `error`, iterators now wraps a `TSMErrors` which contains ALL the encountered errors.
TSMErrors itself implements `Error()`, the returned string contains all the error msgs, separated by "," delimiter.
fix(storage/reads): update sortKey sorting method to use null byte as delimiter, not comma
This change updates the HTTP endpoints that service v1 and v2 writes to
verify the values passed in the precision parameter.
…recision-bp1.8

fix: verify precision parameter in write requests
fix(tls): Enable configuration of TLS 1.3
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.
run cleanup after snapshot creation
if no parallel snapshot is in progress

fixes issue influxdata#16289
@ydkn ydkn requested a review from jacobmarble as a code owner June 2, 2020 08:07
@ydkn ydkn changed the title leftover .tmp folders after backup Remove leftover .tmp folders after backup/snapshot Jun 2, 2020
@ydkn
Copy link
Author

ydkn commented Jun 2, 2020

Sorry wrong branch

@ydkn ydkn closed this Jun 2, 2020
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.

Running influxd.exe backup -portable leaves <x>.tmp folders in data directory on Windows