You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2022/07/20 07:35:45 UTC
[doris] branch master updated: Add some comments for the feature mow (#11028)
This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 a1c1cfce47 Add some comments for the feature mow (#11028)
a1c1cfce47 is described below
commit a1c1cfce478110aae7f6fe4e8c9fed78a3020671
Author: zhannngchen <48...@users.noreply.github.com>
AuthorDate: Wed Jul 20 15:35:41 2022 +0800
Add some comments for the feature mow (#11028)
---
be/src/olap/primary_key_index.h | 2 ++
be/src/olap/tablet_meta.h | 8 ++++++--
.../main/java/org/apache/doris/common/util/PropertyAnalyzer.java | 6 ++++++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/be/src/olap/primary_key_index.h b/be/src/olap/primary_key_index.h
index 2362a1f784..5645ba3c21 100644
--- a/be/src/olap/primary_key_index.h
+++ b/be/src/olap/primary_key_index.h
@@ -34,6 +34,8 @@ namespace doris {
// The primary key index is designed in a similar way like RocksDB
// Partitioned Index, which is created in the segment file when MemTable flushes.
// Index is stored in multiple pages to leverage the IndexedColumnWriter.
+//
+// NOTE: for now, it's only used when unique key merge-on-write property enabled.
class PrimaryKeyIndexBuilder {
public:
PrimaryKeyIndexBuilder(io::FileWriter* file_writer)
diff --git a/be/src/olap/tablet_meta.h b/be/src/olap/tablet_meta.h
index e32b966d1f..60713fa977 100644
--- a/be/src/olap/tablet_meta.h
+++ b/be/src/olap/tablet_meta.h
@@ -240,7 +240,10 @@ private:
// FIXME(cyx): Currently `cooldown_resource` is equivalent to `storage_policy`.
io::ResourceId _cooldown_resource;
- // may be true iff unique keys model.
+ // For unique key data model, the feature Merge-on-Write will leverage a primary
+ // key index and a delete-bitmap to mark duplicate keys as deleted in load stage,
+ // which can avoid the merging cost in read stage, and accelerate the aggregation
+ // query performance significantly.
bool _enable_unique_key_merge_on_write = false;
std::unique_ptr<DeleteBitmap> _delete_bitmap;
@@ -249,7 +252,8 @@ private:
/**
* Wraps multiple bitmaps for recording rows (row id) that are deleted or
- * overwritten.
+ * overwritten. For now, it's only used when unique key merge-on-write property
+ * enabled.
*
* RowsetId and SegmentId are for locating segment, Version here is a single
* uint32_t means that at which "version" of the load causes the delete or
diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java b/fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java
index 84f8170316..76df8ad09d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/PropertyAnalyzer.java
@@ -118,6 +118,12 @@ public class PropertyAnalyzer {
private static final double MAX_FPP = 0.05;
private static final double MIN_FPP = 0.0001;
+ // For unique key data model, the feature Merge-on-Write will leverage a primary
+ // key index and a delete-bitmap to mark duplicate keys as deleted in load stage,
+ // which can avoid the merging cost in read stage, and accelerate the aggregation
+ // query performance significantly.
+ // For the detail design, see the [DISP-018](https://cwiki.apache.org/confluence/
+ // display/DORIS/DSIP-018%3A+Support+Merge-On-Write+implementation+for+UNIQUE+KEY+data+model)
public static final String ENABLE_UNIQUE_KEY_MERGE_ON_WRITE = "enable_unique_key_merge_on_write";
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org