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

feat: support merge small write requests #879

Merged
merged 8 commits into from
May 11, 2023

Conversation

ShiKaiWi
Copy link
Member

@ShiKaiWi ShiKaiWi commented May 9, 2023

Which issue does this PR close?

Closes #

Rationale for this change

Currently, massive small write requests will lead to bad performance because of the lock contention for table writes. By buffering the write requests blocked by the write lock into a wait queue, these small write requests may be merged, leading to a much better performance.

What changes are included in this PR?

  • Buffer the write requests blocked by the write lock and merge and write them when another write worker acquires the write lock.

Are there any user-facing changes?

None.

How does this change test

Existing tests and the newly added unit tests.

@ShiKaiWi ShiKaiWi marked this pull request as ready for review May 9, 2023 12:57
analytic_engine/src/table/mod.rs Outdated Show resolved Hide resolved
analytic_engine/src/table/mod.rs Show resolved Hide resolved
analytic_engine/src/table/mod.rs Outdated Show resolved Hide resolved
@jiacai2050
Copy link
Contributor

Any benchmark result about this PR?

@ShiKaiWi
Copy link
Member Author

Any benchmark result about this PR?

Yes. I'll upload them later.

analytic_engine/src/table/mod.rs Outdated Show resolved Hide resolved
analytic_engine/src/table/mod.rs Show resolved Hide resolved
analytic_engine/src/table/mod.rs Show resolved Hide resolved
Copy link
Contributor

@Rachelint Rachelint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Rachelint Rachelint merged commit 04c297b into apache:main May 11, 2023
5 checks passed
chunshao90 pushed a commit to chunshao90/ceresdb that referenced this pull request May 15, 2023
@ShiKaiWi ShiKaiWi deleted the feat-batch-table-writes branch May 29, 2023 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants