-
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
libroach: try to ingest SSTs without write-stalls #34800
Conversation
I haven't tested this yet on a loaded roachprod cluster but I wanted to see what #34212 thinks of it. |
saw this
|
whoops, yep, accidentally got the bool check backwards -- fixed. |
same issue. Looks like you cannot set the boolean to true |
ah ha I see you define another status var here. Modified locally and running |
okay this works . I do see another error:
I'm pretty sure that's not related. Is there a concern with a race in which data enters the memtable between the flush and the second ingest? |
I ran it for another 10 minutes without hitting any problems. |
whoops, yeah, fixed the shadowed |
re:race. If a write makes it in that would require another flush, on the retry we do allow a write_stall so it should just go ahead and get it done that time. Hopefully a) that is unlikely to happen at all and b) if it does happen, since we just did a flush already, this one should be a very small, very quick, blip at worst. |
c-deps/libroach/db.cc
Outdated
|
||
// It is possible we failed because the memtable wanted to flush but we did | ||
// not allow a blocking flush on the first try. Do a manual, non-blocking | ||
// flush and wait for it, then try again. |
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.
It is confusing to say that the flush is non-blocking and that we'll wait for it. Perhaps something like: Perform a manual flush which will not stall other writes
.
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.
Re-worded.
This attempts to ingest without allowing a memtable flush that could cause write-stalls. If that fails, it then does its own, no-stall flush and waits for it before retrying the ingest. On the re-attempt, the ingest is allowed to do a blocking flush if it needs to, but the hope is that the explicit flush means it will not have to. Release note (perforrmance improvement): reduce impact of bulk data ingestion on foreground traffic with by controlling RocksDB flushes. Release note: None
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.
LGTM
bors r+ |
👎 Rejected by PR status |
manually setting cla status bors r+ |
Build failed (retrying...) |
Build failed (retrying...) |
34800: libroach: try to ingest SSTs without write-stalls r=dt a=dt This attempts to ingest without allowing a memtable flush that could cause write-stalls. If that fails, it then does its own, no-stall flush and waits for it before retrying the ingest. On the re-attempt, the ingest is allowed to do a blocking flush if it needs to, but the hope is that the explicit flush means it will not have to. Release note (perforrmance improvement): reduce impact of bulk data ingestion on foreground traffic with by controlling RocksDB flushes. Release note: None Co-authored-by: David Taylor <tinystatemachine@gmail.com>
Build succeeded |
This attempts to ingest without allowing a memtable flush that could
cause write-stalls. If that fails, it then does its own, no-stall flush
and waits for it before retrying the ingest. On the re-attempt, the
ingest is allowed to do a blocking flush if it needs to, but the hope is
that the explicit flush means it will not have to.
Release note (perforrmance improvement): reduce impact of bulk data ingestion on foreground traffic with by controlling RocksDB flushes.
Release note: None