This is an automated email from the ASF dual-hosted git repository.

zhangchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 84413f33b8 [enhancement](merge-on-write) add skip_delete_bitmap 
session variable for debug purpose (#17127)
84413f33b8 is described below

commit 84413f33b8d6d4ddc13635535ff0b9c0c3d6af51
Author: zhannngchen <48427519+zhannngc...@users.noreply.github.com>
AuthorDate: Mon Feb 27 23:31:28 2023 +0800

    [enhancement](merge-on-write) add skip_delete_bitmap session variable for 
debug purpose (#17127)
---
 be/src/runtime/runtime_state.h                                 |  4 ++++
 be/src/vec/exec/scan/new_olap_scanner.cpp                      |  2 +-
 docs/en/docs/advanced/variables.md                             |  4 ++++
 docs/zh-CN/docs/advanced/variables.md                          |  4 ++++
 .../src/main/java/org/apache/doris/qe/SessionVariable.java     | 10 ++++++++++
 gensrc/thrift/PaloInternalService.thrift                       |  3 +++
 6 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/be/src/runtime/runtime_state.h b/be/src/runtime/runtime_state.h
index fc0a7f088e..029c74d27d 100644
--- a/be/src/runtime/runtime_state.h
+++ b/be/src/runtime/runtime_state.h
@@ -295,6 +295,10 @@ public:
         return _query_options.__isset.skip_delete_predicate && 
_query_options.skip_delete_predicate;
     }
 
+    bool skip_delete_bitmap() const {
+        return _query_options.__isset.skip_delete_bitmap && 
_query_options.skip_delete_bitmap;
+    }
+
     int partitioned_hash_join_rows_threshold() const {
         if (!_query_options.__isset.partitioned_hash_join_rows_threshold) {
             return 0;
diff --git a/be/src/vec/exec/scan/new_olap_scanner.cpp 
b/be/src/vec/exec/scan/new_olap_scanner.cpp
index 272fd6b6cc..b5b82c00f7 100644
--- a/be/src/vec/exec/scan/new_olap_scanner.cpp
+++ b/be/src/vec/exec/scan/new_olap_scanner.cpp
@@ -329,7 +329,7 @@ Status NewOlapScanner::_init_tablet_reader_params(
         _tablet_reader_params.use_page_cache = true;
     }
 
-    if (_tablet->enable_unique_key_merge_on_write()) {
+    if (_tablet->enable_unique_key_merge_on_write() && 
!_state->skip_delete_bitmap()) {
         _tablet_reader_params.delete_bitmap = 
&_tablet->tablet_meta()->delete_bitmap();
     }
 
diff --git a/docs/en/docs/advanced/variables.md 
b/docs/en/docs/advanced/variables.md
index c4d2e6f983..2ccd506c44 100644
--- a/docs/en/docs/advanced/variables.md
+++ b/docs/en/docs/advanced/variables.md
@@ -539,6 +539,10 @@ Translated with www.DeepL.com/Translator (free version)
 
     For debugging purpose. In vectorized execution engine, in case of problems 
of reading data, setting value to `true` will also read deleted data.
 
+* `skip_delete_bitmap`
+
+    For debugging purpose. In Unique Key MoW table, in case of problems of 
reading data, setting value to `true` will also read deleted data.
+
 * `default_password_lifetime`
 
        Default password expiration time. The default value is 0, which means 
no expiration. The unit is days. This parameter is only enabled if the user's 
password expiration property has a value of DEFAULT. like:
diff --git a/docs/zh-CN/docs/advanced/variables.md 
b/docs/zh-CN/docs/advanced/variables.md
index 98af616bab..4606376e75 100644
--- a/docs/zh-CN/docs/advanced/variables.md
+++ b/docs/zh-CN/docs/advanced/variables.md
@@ -527,6 +527,10 @@ SELECT /*+ SET_VAR(query_timeout = 1, 
enable_partition_cache=true) */ sleep(3);
 
        用于调试目的。在向量化执行引擎中,当发现读取表的数据结果有误的时候,把此变量的值设置为`true`,将会把被删除的数据当成正常数据读取。
 
+* `skip_delete_bitmap`
+
+    用于调试目的。在Unique Key MoW表中,当发现读取表的数据结果有误的时候,把此变量的值设置为`true`,将会把被delete 
bitmap标记删除的数据当成正常数据读取。
+
 * `default_password_lifetime`
 
        默认的密码过期时间。默认值为 0,即表示不过期。单位为天。该参数只有当用户的密码过期属性为 DEFAULT 值时,才启用。如:
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
index 54eec46afa..cc11307e4a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
@@ -238,6 +238,8 @@ public class SessionVariable implements Serializable, 
Writable {
 
     public static final String SKIP_DELETE_SIGN = "skip_delete_sign";
 
+    public static final String SKIP_DELETE_BITMAP = "skip_delete_bitmap";
+
     public static final String ENABLE_NEW_SHUFFLE_HASH_METHOD = 
"enable_new_shuffle_hash_method";
 
     public static final String ENABLE_PUSH_DOWN_NO_GROUP_AGG = 
"enable_push_down_no_group_agg";
@@ -656,6 +658,12 @@ public class SessionVariable implements Serializable, 
Writable {
     @VariableMgr.VarAttr(name = SKIP_DELETE_SIGN)
     public boolean skipDeleteSign = false;
 
+    /**
+     * For debug purpose, skip delete bitmap when reading data.
+     */
+    @VariableMgr.VarAttr(name = SKIP_DELETE_BITMAP)
+    public boolean skipDeleteBitmap = false;
+
     // This variable is used to avoid FE fallback to the original parser. When 
we execute SQL in regression tests
     // for nereids, fallback will cause the Doris return the correct result 
although the syntax is unsupported
     // in nereids for some mistaken modification. You should set it on the
@@ -1583,6 +1591,8 @@ public class SessionVariable implements Serializable, 
Writable {
 
         tResult.setSkipDeletePredicate(skipDeletePredicate);
 
+        tResult.setSkipDeleteBitmap(skipDeleteBitmap);
+
         
tResult.setPartitionedHashJoinRowsThreshold(partitionedHashJoinRowsThreshold);
         
tResult.setPartitionedHashAggRowsThreshold(partitionedHashAggRowsThreshold);
 
diff --git a/gensrc/thrift/PaloInternalService.thrift 
b/gensrc/thrift/PaloInternalService.thrift
index e2c962a228..ac8fcb111b 100644
--- a/gensrc/thrift/PaloInternalService.thrift
+++ b/gensrc/thrift/PaloInternalService.thrift
@@ -198,6 +198,9 @@ struct TQueryOptions {
   61: optional i32 insert_timeout = 14400
 
   62: optional i32 execution_timeout = 3600
+
+  // For debug purpose, skip delete bitmap when reading data
+  63: optional bool skip_delete_bitmap = false
 }
     
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to