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 2023/01/08 10:39:16 UTC

[GitHub] [doris] github-actions[bot] commented on a diff in pull request #15713: [refactor] separate agg and flush in memtable

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


##########
be/src/olap/memtable.cpp:
##########
@@ -386,13 +386,15 @@ void MemTable::shrink_memtable_by_agg() {
     _collect_vskiplist_results<false>();
 }
 
-bool MemTable::is_flush() const {
+bool MemTable::need_flush() const {
     return memory_usage() >= config::write_buffer_size;
 }
 
-bool MemTable::need_to_agg() {
-    return keys_type() == KeysType::DUP_KEYS ? is_flush()
-                                             : memory_usage() >= config::memtable_max_buffer_size;
+bool MemTable::need_agg() const {
+    if (keys_type() == KeysType::AGG_KEYS)
+        return memory_usage() >= config::write_buffer_size_for_agg;

Review Comment:
   warning: statement should be inside braces [readability-braces-around-statements]
   
   ```suggestion
       if (keys_type() == KeysType::AGG_KEYS) {
           return memory_usage() >= config::write_buffer_size_for_agg;
   }
   ```
   



-- 
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