-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Lightning: Make sure we are using default block size of 16KB if user does not specify one. #60097
Lightning: Make sure we are using default block size of 16KB if user does not specify one. #60097
Conversation
Hi @OliverS929. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/ok-to-test |
Please make sure to add enough test cases to avoid regression later. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #60097 +/- ##
================================================
+ Coverage 73.1493% 73.9514% +0.8020%
================================================
Files 1706 1738 +32
Lines 471415 483520 +12105
================================================
+ Hits 344837 357570 +12733
+ Misses 105415 104036 -1379
- Partials 21163 21914 +751
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
/retest |
@@ -59,6 +59,9 @@ var ( | |||
normalIterStartKey = []byte{1} | |||
) | |||
|
|||
// DefaultBlockSize ensures we are using a block size larger than 16KB, whereas 4KB is the default block size of Pebble. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also explain why 4KB pebble default value is not a good choice? and what problem will it cause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you write the detail of manual test
?
@@ -1423,6 +1426,12 @@ func newSSTWriter(path string, blockSize int) (*sstable.Writer, error) { | |||
if err != nil { | |||
return nil, errors.Trace(err) | |||
} | |||
|
|||
// Logic to check the block size we are using is 16KB by default. | |||
if blockSize <= 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also check even this blocksize set, we still has risk to OOM?
/retest |
/retest |
1 similar comment
/retest |
require.True(t, blockSizeField.IsValid(), "blockSize field should be valid") | ||
require.Equal(t, config.DefaultBlockSize, int(blockSizeField.Int())) | ||
|
||
// Clean up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why above comment withnot upper case,here the comment with upper case start?please make consistency.
you can ignore the customer part, just describe the steps and results from tech point of view |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest lgtm
// potentially causing a memory spike and leading to an Out of Memory (OOM) scenario. | ||
// If the user specifies a smaller block size, respect their choice. | ||
if blockSize <= 0 { | ||
blockSize = config.DefaultBlockSize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also replace the literal inside NewConfig
, BlockSize: 16 * 1024,
Sure. To test the specific issue addressed in this PR, I used a ~1.4TB dataset consisting mostly of duplicate data. Before the fix, memory usage spiked during the ingest phase due to the large index metadata loaded by Pebble, causing OOM kills on a 16c64g VM. With the fix, memory consumption remained stable, staying below 17GB and leading to no disastrous memory spikes. |
[LGTM Timeline notifier]Timeline:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Benjamin2037, lance6716, wjhuang2016 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
please add it to the PR description, under |
Please remember add integration test. |
/retest |
Done. |
/retest |
3 similar comments
/retest |
/retest |
/retest |
/cherry-pick release-8.5 |
/cherry-pick release-8.1 |
@OliverS929: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
@OliverS929: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #59947
Problem Summary:
Make we are using a sufficient default block size. Ref #49514
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.