You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/12/19 10:43:40 UTC
[GitHub] [doris] github-actions[bot] commented on a diff in pull request #14595: [enhancement](load) multipass segcompaction to reduce segments before publish (#14590)
github-actions[bot] commented on code in PR #14595:
URL: https://github.com/apache/doris/pull/14595#discussion_r1052058712
##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -52,8 +52,11 @@ BetaRowsetWriter::BetaRowsetWriter()
_total_data_size(0),
_total_index_size(0),
_raw_num_rows_written(0),
- _is_doing_segcompaction(false) {
- _segcompaction_status.store(OK);
+ _is_doing_segcompaction(false),
+ _total_row_num_written(0) {
+ _segcompaction_status.store(OLAP_SUCCESS);
+ bthread_mutex_init(&_is_doing_segcompaction_lock, NULL);
Review Comment:
warning: use nullptr [modernize-use-nullptr]
```suggestion
bthread_cond_init(&_segcompacting_cond, nullptr);
```
##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -52,8 +52,11 @@ BetaRowsetWriter::BetaRowsetWriter()
_total_data_size(0),
_total_index_size(0),
_raw_num_rows_written(0),
- _is_doing_segcompaction(false) {
- _segcompaction_status.store(OK);
+ _is_doing_segcompaction(false),
+ _total_row_num_written(0) {
+ _segcompaction_status.store(OLAP_SUCCESS);
Review Comment:
warning: use nullptr [modernize-use-nullptr]
```suggestion
bthread_mutex_init(&_is_doing_segcompaction_lock, nullptr);
```
##########
be/test/olap/segcompaction_test.cpp:
##########
@@ -576,6 +580,151 @@ TEST_F(SegCompactionTest, SegCompactionInterleaveWithBig_OoOoO) {
}
}
+TEST_F(SegCompactionTest, SegCompactionMultiPass) {
+ /* ooooOOoQooooooooO (Q is bigger than O) will be oOOoQooO after 1st-pass segcompaction
+ * finally we get OQO after final-pass segcompaction
+ * */
+ config::enable_segcompaction_during_load = true;
+ config::enable_storage_vectorization = true;
+ config::enable_segcompaction_after_load = true;
+ config::max_segment_num_per_rowset = 5;
+
+ Status s;
+ TabletSchemaSPtr tablet_schema = std::make_shared<TabletSchema>();
+ create_tablet_schema(tablet_schema);
+
+ RowsetSharedPtr rowset;
+ config::segcompaction_small_threshold = 6000; // set threshold above
+ // rows_per_segment
+ std::vector<uint32_t> segment_num_rows;
+ { // write `num_segments * rows_per_segment` rows to rowset
+ RowsetWriterContext writer_context;
+ create_rowset_writer_context(10049, tablet_schema, &writer_context);
+
Review Comment:
warning: too few arguments to function call, expected 3, have 2 [clang-diagnostic-error]
```cpp
s = RowsetFactory::create_rowset_writer(writer_context, &rowset_writer);
^
```
**be/src/olap/rowset/rowset_factory.h:39:** 'create_rowset_writer' declared here
```cpp
static Status create_rowset_writer(const RowsetWriterContext& context, bool is_vertical,
^
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org