This repository was archived by the owner on Aug 13, 2019. It is now read-only.
Migrate write ahead log - #340
Merged
Merged
Conversation
jkohen
reviewed
May 30, 2018
| if err != nil { | ||
| return errors.Wrap(err, "write new entries") | ||
| } | ||
| if err := w.Close(); err != nil { |
There was a problem hiding this comment.
Don't you want to close both WALs regardless of errors?
Contributor
|
I was thinking that with more versions and more changes this repair/convert logics might "contaminate" 💩 the code. Why not add this as part of the tsdb cli tool? I have already added tsdb scan so maybe something like |
Contributor
Author
|
Because our stability guarantee is that you can just restart Prometheus
with the next minor and things will work. Telling people to use a CLI tool
is breaking that guarantee.
…On Wed, May 30, 2018 at 3:01 PM Krasi Georgiev ***@***.***> wrote:
I was thinking that with more versions and more changes this
repair/convert blocks might "contaminate" 💩 the code. Why not add this
as part of the tsdb cli tool?
I have already added tsdb scan
<#320> so maybe something like tsdb
upgrade
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#340 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEuA8nagfH8xJnVQVZRRWQ5Yep4bA3qUks5t3uyDgaJpZM4USSqA>
.
|
fabxc
force-pushed
the
wal_migrate
branch
3 times, most recently
from
June 5, 2018 08:58
1293437 to
82363d2
Compare
added 3 commits
July 19, 2018 07:34
On startup, rewrite the old write ahead log into the new format once. Signed-off-by: Fabian Reinartz <freinartz@google.com>
Signed-off-by: Fabian Reinartz <freinartz@google.com>
Signed-off-by: Fabian Reinartz <freinartz@google.com>
Contributor
Author
|
Rebased and resolved conflicts. |
|
|
||
| // SegmentWAL is a write ahead log for series data. | ||
| // | ||
| // DEPRECATED: use wal pkg combined with the record coders instead. |
| if err != nil { | ||
| return errors.Wrap(err, "open new WAL") | ||
| } | ||
| // We close it once already before as part of finalization. |
Contributor
There was a problem hiding this comment.
This doesn't read properly
| if err := repl.Close(); err != nil { | ||
| return errors.Wrap(err, "close new WAL") | ||
| } | ||
| if err := fileutil.Rename(tmpdir, dir); err != nil { |
Contributor
There was a problem hiding this comment.
This no longer works given that dir already exists and Rename no longer deletes the destination first.
Signed-off-by: Fabian Reinartz <freinartz@google.com>
Contributor
Author
|
Merging this into the branch for the new WAL so we can have a final pass over all changes together. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On startup, rewrite the old write ahead log into the new format once.
@jkohen @brian-brazil