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

[DocDB] Flush regular db immediate if intents db write is blocked by immutable mem tables #18358

Closed
1 task done
spolitov opened this issue Jul 21, 2023 · 0 comments
Closed
1 task done
Assignees
Labels
area/docdb YugabyteDB core features kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@spolitov
Copy link
Contributor

spolitov commented Jul 21, 2023

Jira Link: DB-7343

Description

We cannot flush intents db before regular db, since it could result in situation when intents were deleted from intents db.
But transaction was not yet applied to regular db.
So there is a logic to postpone intents db flush until regular db is flushed.

RocksDB rejects new writes when there are too many non flushed mem tables.
In our system it is configured to 2 mem tables.

So we could get into situation when writes are blocked because there are too many non flushed mem tables in intents db.
But intents db waits until regular db is flushed.

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@spolitov spolitov added area/docdb YugabyteDB core features status/awaiting-triage Issue awaiting triage labels Jul 21, 2023
@spolitov spolitov self-assigned this Jul 21, 2023
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue labels Jul 21, 2023
spolitov added a commit that referenced this issue Jul 24, 2023
…cked by immutable mem tables

Summary:
We cannot flush intents db before regular db, since it could result in situation when intents were deleted from intents db.
But transaction was not yet applied to regular db.
So there is a logic to postpone intents db flush until regular db is flushed.

RocksDB rejects new writes when there are too many non flushed mem tables.
In our system it is configured to 2 mem tables.

We could get into situation when writes are blocked because there are too many non flushed mem tables in intents db.
But intents db waits until regular db is flushed.
So write will blocked for 2 second, until we flush regular db because of `intents_flush_max_delay_ms`.

The issue was found when I was working on new test PgSingleTServerTest.ScanComplexPK.
Without this fix, test execution time in release mode is 90s+.
With this fix, test execution time in release mode is 50s-.
Jira: DB-7343

Test Plan: PgSingleTServerTest.ScanComplexPK

Reviewers: bogdan, rthallam

Reviewed By: bogdan

Subscribers: yql, ybase

Differential Revision: https://phorge.dev.yugabyte.com/D27163
@yugabyte-ci yugabyte-ci removed the status/awaiting-triage Issue awaiting triage label Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

3 participants