-
Notifications
You must be signed in to change notification settings - Fork 179
Conversation
wal.go
Outdated
if err != nil { | ||
return errors.Wrap(err, "write new entries") | ||
} | ||
if err := w.Close(); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you want to close both WALs regardless of errors?
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 |
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>
.
|
1293437
to
82363d2
Compare
On startup, rewrite the old write ahead log into the new format once. Signed-off-by: Fabian Reinartz <[email protected]>
Signed-off-by: Fabian Reinartz <[email protected]>
Signed-off-by: Fabian Reinartz <[email protected]>
Rebased and resolved conflicts. |
@@ -173,6 +176,8 @@ func newCRC32() hash.Hash32 { | |||
} | |||
|
|||
// SegmentWAL is a write ahead log for series data. | |||
// | |||
// DEPRECATED: use wal pkg combined with the record coders instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/coders/codex/
wal.go
Outdated
if err != nil { | ||
return errors.Wrap(err, "open new WAL") | ||
} | ||
// We close it once already before as part of finalization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This no longer works given that dir already exists and Rename no longer deletes the destination first.
Signed-off-by: Fabian Reinartz <[email protected]>
Merging this into the branch for the new WAL so we can have a final pass over all changes together. |
On startup, rewrite the old write ahead log into the new format once.
@jkohen @brian-brazil