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