Repository navigation
Limit V2 segment file row count (#1647) - #1705
Merged
Merged
Conversation
Contributor
Author
|
cc @gaodayue |
chaoyli
requested changes
Aug 27, 2019
| if (PREDICT_FALSE(_segment_writer == nullptr)) { | ||
| RETURN_NOT_OK(_create_segment_writer()); | ||
| } | ||
| if (PREDICT_FALSE(_segment_writer->reach_capacity())) { |
Contributor
There was a problem hiding this comment.
You can check with _max_segment_size together.
gaodayue
requested changes
Aug 28, 2019
|
|
||
| uint64_t estimate_segment_size(); | ||
|
|
||
| bool reach_capacity(); |
Contributor
There was a problem hiding this comment.
I prefer to have a function named num_rows_written() and move the logic of when to flush segment to BetaRowsetWriter.
| std::unique_ptr<WritableFile> _output_file; | ||
| std::vector<ColumnWriter*> _column_writers; | ||
| uint64_t _row_count = 0; | ||
| const int32_t MAX_ROW_COUNT = INT_MAX; |
Contributor
There was a problem hiding this comment.
INT_MAX is not the same on different platforms, better to use INT32_MAX.
| if (PREDICT_FALSE(_segment_writer == nullptr)) { | ||
| RETURN_NOT_OK(_create_segment_writer()); | ||
| } | ||
| if (PREDICT_FALSE(_segment_writer->reach_capacity())) { |
Contributor
|
In addition
|
liutang123
force-pushed
the
list-segment-file-size
branch
from
August 30, 2019 09:13
cfd9f36 to
612458d
Compare
chaoyli
approved these changes
Aug 30, 2019
Contributor
|
LGTM, I will merge it after code checks. |
imay
reviewed
Aug 30, 2019
|
|
||
| uint64_t estimate_segment_size(); | ||
|
|
||
| uint32_t num_rows_written() { return _row_count; } |
Contributor
There was a problem hiding this comment.
Suggested change
| uint32_t num_rows_written() { return _row_count; } | |
| uint32_t num_rows_written() const { return _row_count; } |
swjtu-zhanglei
pushed a commit
to swjtu-zhanglei/incubator-doris
that referenced
this pull request
Jul 25, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because many bitmap implementations usually only support 32 bits integer,
so use INT_MAX to limit the row count of a segment file.