-
Notifications
You must be signed in to change notification settings - Fork 4k
storage: introduce guaranteed durability functionality #76793
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
Conversation
sumeerbhola
left a comment
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.
Reviewable status:
complete! 0 of 0 LGTMs obtained
pkg/storage/pebble.go, line 901 at r1 (raw file):
atomic.AddInt64(&p.diskSlowCount, 1) }, FlushEnd: func(info pebble.FlushInfo) {
Note that this does not use the Pebble code introduced in cockroachdb/pebble#1505, and instead uses EventListener as suggested by Peter cockroachdb/pebble#1505 (review)
4d79d8a to
66de60a
Compare
jbowens
left a comment
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.
Reviewed 5 of 14 files at r1, 1 of 2 files at r2, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @jbowens)
|
TFTR! |
This is the CockroachDB plumbing for Pebble's IterOptions.OnlyReadGuaranteedDurable. It is for use in the raftLogTruncator cockroachdb#76215. Since most of the exported interfaces in the storage package use a Reader, we support this via a DurabilityRequirement parameter on Engine.NewReadOnly, and not via an iterator option. There is also a RegisterFlushCompletedCallback method on Engine which will be used to poll certain durable state in the raftLogTruncator. Other than the trivial plumbing, this required some refactoring of the Reader.MVCCGet* code for Pebble and pebbleReadOnly. Even though it is deprecated and primarily/only used in tests, we don't want to have the durability semantics diverge. Release note: None
66de60a to
ac7e0b6
Compare
|
TestTenantLogic timeout must be a flake since nothing other than tests uses this new functionality. |
|
bors r=jbowens |
|
Build failed (retrying...): |
|
Build succeeded: |
This is the CockroachDB plumbing for Pebble's
IterOptions.OnlyReadGuaranteedDurable. It is for use in
the raftLogTruncator #76215.
Since most of the exported interfaces in the storage
package use a Reader, we support this via a
DurabilityRequirement parameter on Engine.NewReadOnly,
and not via an iterator option.
There is also a RegisterFlushCompletedCallback method
on Engine which will be used to poll certain durable
state in the raftLogTruncator.
Other than the trivial plumbing, this required some
refactoring of the Reader.MVCCGet* code for Pebble
and pebbleReadOnly. Even though it is deprecated and
primarily/only used in tests, we don't want to have
the durability semantics diverge.
Release note: None