github-actions[bot] commented on code in PR #14595:
URL: https://github.com/apache/doris/pull/14595#discussion_r1052178246


##########
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) {
+          _is_doing_segcompaction(false),
+          _total_row_num_written(0) {
     _segcompaction_status.store(OK);
+    bthread_mutex_init(&_is_doing_segcompaction_lock, NULL);

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);
+
+        std::unique_ptr<RowsetWriter> rowset_writer;
+        s = RowsetFactory::create_rowset_writer(writer_context, 
&rowset_writer);

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,
                     ^
   ```
   



##########
be/src/olap/rowset/beta_rowset_writer.cpp:
##########
@@ -52,8 +52,11 @@
           _total_data_size(0),
           _total_index_size(0),
           _raw_num_rows_written(0),
-          _is_doing_segcompaction(false) {
+          _is_doing_segcompaction(false),
+          _total_row_num_written(0) {
     _segcompaction_status.store(OK);
+    bthread_mutex_init(&_is_doing_segcompaction_lock, NULL);
+    bthread_cond_init(&_segcompacting_cond, NULL);

Review Comment:
   warning: use nullptr [modernize-use-nullptr]
   
   ```suggestion
       bthread_cond_init(&_segcompacting_cond, nullptr);
   ```
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to