-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
storage: rely on pebble for log message in case of write stall #95436
storage: rely on pebble for log message in case of write stall #95436
Conversation
e19c756
to
47c4fce
Compare
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 all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @joshimhoff)
pkg/storage/pebble.go
line 1001 at r1 (raw file):
log.Fatalf(ctx, "write stall detected: %s", info) } else { log.Errorf(ctx, "write stall detected: %s", info)
nit: can we use language like "file write stall"? there's a separate stall that's possible which we typically call a "WriteStall" (see up above where we install a WriteStallBegin
handler). that other form of "write stall" happens when we've reached the memtable limit are blocked on the flush completing before we'll allow new writes to commit.
47c4fce
to
32bf820
Compare
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Good idea! I've updated the log message as you suggested. Reviewable is being slow for me, so responding here. TTFR! |
bors r+ |
bors r+ |
Already running a review |
32bf820
to
ca3adf5
Compare
Canceled. |
ca3adf5
to
7b5e7e3
Compare
In case of a write stall, CRDB logs out details re: the write stall. By default, CRDB logs at fatal level & then crashes. Before this commit, tho the pebble event had a String method, it was not used in the CRDB log message. This means adding additional context to the pebble event will not add the context to the CRDB logs, unless a CRDB change is made in addition to a pebble change. With this commit, the log message calls the pebble event's String method. Release note (ops change): CRDB log message in case of write stall has been adjusted slightly.
7b5e7e3
to
c48e3c7
Compare
bors r+ |
Build succeeded: |
Part of #67856. Haven't added additional context re: op type & size of write to
pebble.DiskSlowInfo
but will do that shortly. With this change, if we make changes to how much context is included inpebble.DiskSlowInfo
, we will not need to make a CRDB change to have the context in the CRDB logs. Note also that I will adjust the pebble String method to be less accusatory to disks ("disk slow" -> "write slow").See below for log message with this commit in.
storage: rely on pebble for log message in case of write stall
In case of a write stall, CRDB logs out details re: the write stall. By
default, CRDB logs at fatal level & then crashes. Before this commit, tho the
pebble event had a String method, it was not used in the CRDB log message.
This means adding additional context to the pebble event will not add the
context to the CRDB logs, unless a CRDB change is made in addition to a pebble
change. With this commit, the log message calls the pebble event's String
method.
Release note (ops change): CRDB log message in case of write stall has been
adjusted slightly.