You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/08/04 12:46:53 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #1576: Change cumulative compaction for decoupling storage from compution

imay commented on a change in pull request #1576: Change cumulative compaction for decoupling storage from compution
URL: https://github.com/apache/incubator-doris/pull/1576#discussion_r310385429
 
 

 ##########
 File path: be/src/olap/base_compaction.h
 ##########
 @@ -32,152 +33,45 @@ namespace doris {
 class Rowset;
 class RowsetReader;
 
-// @brief 实现对START_BASE_COMPACTION命令的处理逻辑,并返回处理结果
+// @brief 实现对START_BASE_COMPACTION命令的处理逻辑,并返回处理结果l
+
 class BaseCompaction {
 public:
-    BaseCompaction() :
-            _new_base_version(0, 0),
-            _old_base_version(0, 0),
-            _base_compaction_locked(false),
-            _rs_writer(nullptr) {}
-
-    virtual ~BaseCompaction() {
-        _release_base_compaction_lock();
-    }
-
-    // 初始化BaseCompaction, 主要完成以下工作:
-    // 1. 检查是否满足base compaction策略
-    // 2. 如果满足,计算需要合并哪些版本
-    //
-    // 输入参数:
-    // - tablet: 待执行BE的Tablet的智能指针
-    // - is_manual_trigger
-    //   - 如果为true,则是手动执行START_BASE_COMPACTION命令
-    //   - 如果为false,则是根据BE策略来执行
-    //
-    // 返回值:
-    // - 如果init执行成功,即可以执行BE,则返回OLAP_SUCCESS;
-    // - 其它情况下,返回相应的错误码
-    OLAPStatus init(TabletSharedPtr tablet, bool is_manual_trigger = false);
-
-    // 执行BaseCompaction, 可能会持续很长时间
-    //
-    // 返回值:
-    // - 如果执行成功,则返回OLAP_SUCCESS;
-    // - 其它情况下,返回相应的错误码
-    OLAPStatus run();
+    BaseCompaction(TabletSharedPtr tablet);
 
 Review comment:
   you should add comments for these public functions. It's better to add an example for how to use this class.
   
   If some functions aren't intended to be used by others, please make them private

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org