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

fix: freeze data buffer in shard #3468

Merged
merged 6 commits into from Mar 11, 2024
Merged

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Mar 8, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

This PR fixes an issue that a shard never freezes its data buffer.

  • It adds data_freeze_threshold to the Shard and checks whether the shard needs to freeze in write_with_pk_id().
  • It enlarges default data_freeze_threshold to 131072

It also corrects some metrics in the PartitionContext as we share it across partitions.

We might need to test the write performance again after merging this PR.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@evenyag evenyag marked this pull request as ready for review March 11, 2024 04:33
@evenyag evenyag marked this pull request as draft March 11, 2024 04:35
@evenyag evenyag marked this pull request as ready for review March 11, 2024 13:47
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

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

LGTM

@v0y4g3r v0y4g3r added this pull request to the merge queue Mar 11, 2024
Merged via the queue into GreptimeTeam:main with commit 06dcd0f Mar 11, 2024
16 checks passed
@v0y4g3r v0y4g3r deleted the fix/freeze-shard branch March 11, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants