Skip to content
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

MemoryMonitor could flush tablet that was just flushed #1880

Closed
spolitov opened this issue Jul 23, 2019 · 0 comments
Closed

MemoryMonitor could flush tablet that was just flushed #1880

spolitov opened this issue Jul 23, 2019 · 0 comments
Assignees
Labels
area/docdb YugabyteDB core features

Comments

@spolitov
Copy link
Contributor

When global memstore memory limit exceeded tablet with the oldest most recent unflushed operation is picked and requested to flush.
But it is separate operations, so the tablet could be flushed after the pick.
And near-empty memtable would be marked for flush.
It could cause write to stop for some time since we will have 2 flushing memtables.

@spolitov spolitov added the area/docdb YugabyteDB core features label Jul 23, 2019
@spolitov spolitov self-assigned this Jul 23, 2019
@spolitov spolitov changed the title MemoryMonitor could flush tablet that we just flushed MemoryMonitor could flush tablet that was just flushed Jul 23, 2019
spolitov added a commit that referenced this issue Jul 26, 2019
Summary:
When global memstore memory limit exceeded tablet with the oldest most recent unflushed operation is picked and requested to flush.
But it is separate operations, so the tablet could be flushed after the pick.
And near-empty memtable would be marked for the flush.
It could cause write to stop for some time since we will have 2 flushing memtables.

Another similar problem that picked tablet could could already have flushing mem table.
So when flush is requested because of global memory limit it will result in 2 flushing mem tables.

The problem with 2 flushing memtables that rocksdb stops write in this case.

Fixed by preventing flushes of such tablets.

Test Plan: ybd debug --gtest_filter QLTabletTest.DoubleFlush

Reviewers: mikhail, timur, amitanand

Reviewed By: amitanand

Subscribers: ybase, bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D6948
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features
Projects
None yet
Development

No branches or pull requests

1 participant