This is an automated email from the ASF dual-hosted git repository.
zhangchen pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new 33c538acc3 [enhancement](merge-on-write) add skip_delete_bitmap
session variable for debug purpose (#17167)
33c538acc3 is described below
commit 33c538acc369fc1a46dae174e858b49392d13923
Author: zhannngchen <[email protected]>
AuthorDate: Mon Feb 27 16:09:31 2023 +0800
[enhancement](merge-on-write) add skip_delete_bitmap session variable for
debug purpose (#17167)
---
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 cdbfeff5fa..454fe1bd21 100644
--- a/be/src/runtime/runtime_state.h
+++ b/be/src/runtime/runtime_state.h
@@ -357,6 +357,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 cc1f030c6a..7c78a92b27 100644
--- a/be/src/vec/exec/scan/new_olap_scanner.cpp
+++ b/be/src/vec/exec/scan/new_olap_scanner.cpp
@@ -260,7 +260,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 0da3bb5ede..d59b959f75 100644
--- a/docs/en/docs/advanced/variables.md
+++ b/docs/en/docs/advanced/variables.md
@@ -532,6 +532,10 @@ Translated with www.DeepL.com/Translator (free version)
* `skip_delete_predicate`
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 19e585eae7..a314e63b93 100644
--- a/docs/zh-CN/docs/advanced/variables.md
+++ b/docs/zh-CN/docs/advanced/variables.md
@@ -522,6 +522,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 428eca11ae..5226911e5d 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
@@ -232,6 +232,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";
@@ -618,6 +620,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
@@ -1388,6 +1396,8 @@ public class SessionVariable implements Serializable,
Writable {
tResult.setSkipDeletePredicate(skipDeletePredicate);
+ tResult.setSkipDeleteBitmap(skipDeleteBitmap);
+
tResult.setPartitionedHashJoinRowsThreshold(partitionedHashJoinRowsThreshold);
return tResult;
diff --git a/gensrc/thrift/PaloInternalService.thrift
b/gensrc/thrift/PaloInternalService.thrift
index 5d52e76f07..816b932e7d 100644
--- a/gensrc/thrift/PaloInternalService.thrift
+++ b/gensrc/thrift/PaloInternalService.thrift
@@ -185,6 +185,9 @@ struct TQueryOptions {
54: optional bool enable_share_hash_table_for_broadcast_join
55: optional bool check_overflow_for_decimal = false
+
+ // For debug purpose, skip delete bitmap when reading data
+ 56: optional bool skip_delete_bitmap = false
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]