Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

feat: support merge small write requests#879

Merged
Rachelint merged 8 commits into
apache:mainfrom
ShiKaiWi:feat-batch-table-writes
May 11, 2023
Merged

feat: support merge small write requests#879
Rachelint merged 8 commits into
apache:mainfrom
ShiKaiWi:feat-batch-table-writes

Conversation

@ShiKaiWi

@ShiKaiWi ShiKaiWi commented May 9, 2023

Copy link
Copy Markdown
Member

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
Comment thread analytic_engine/src/table/mod.rs Outdated
Comment thread analytic_engine/src/table/mod.rs
Comment thread analytic_engine/src/table/mod.rs Outdated
@jiacai2050

Copy link
Copy Markdown
Contributor

Any benchmark result about this PR?

@ShiKaiWi

Copy link
Copy Markdown
Member Author

Any benchmark result about this PR?

Yes. I'll upload them later.

Comment thread analytic_engine/src/table/mod.rs Outdated
Comment thread analytic_engine/src/table/mod.rs
Comment thread analytic_engine/src/table/mod.rs

@Rachelint Rachelint left a comment

Copy link
Copy Markdown
Contributor

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
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants