You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ya...@apache.org on 2021/12/21 03:06:23 UTC
[incubator-doris] branch master updated: [community][chore] Modify .asf.yaml and fix BE build warning (#7439)
This is an automated email from the ASF dual-hosted git repository.
yangzhg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 97749ed [community][chore] Modify .asf.yaml and fix BE build warning (#7439)
97749ed is described below
commit 97749ed85b620696ba6e032bc3449b6a428ff054
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Tue Dec 21 11:06:12 2021 +0800
[community][chore] Modify .asf.yaml and fix BE build warning (#7439)
---
.asf.yaml | 6 ++++++
be/src/util/tuple_row_zorder_compare.cpp | 7 ++++---
.../java/org/apache/doris/clone/ClusterLoadStatistic.java | 14 ++++++++------
3 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/.asf.yaml b/.asf.yaml
index 46b0d89..e928b39 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -21,6 +21,10 @@ github:
labels:
- data-warehousing
- mpp
+ - olap
+ - dbms
+ - apache
+ - doris
enabled_merge_buttons:
squash: true
merge: false
@@ -30,3 +34,5 @@ github:
required_pull_request_reviews:
dismiss_stale_reviews: true
required_approving_review_count: 1
+ notifications:
+ pullrequests_status: dev@doris.apache.org
diff --git a/be/src/util/tuple_row_zorder_compare.cpp b/be/src/util/tuple_row_zorder_compare.cpp
index 58318e6..6697b3c 100644
--- a/be/src/util/tuple_row_zorder_compare.cpp
+++ b/be/src/util/tuple_row_zorder_compare.cpp
@@ -163,13 +163,14 @@ namespace doris {
T floating_value = *reinterpret_cast<const T *>(val);
memcpy(&tmp, &floating_value, sizeof(T));
if (UNLIKELY(std::isnan(floating_value))) return 0;
+ // "int" is enough because U and T are only primitive type
+ int s = (int)((sizeof(U) - sizeof(T)) * 8);
if (floating_value < 0.0) {
// Flipping all bits for negative values.
- return static_cast<U>(~tmp) << std::max((sizeof(U) - sizeof(T)) * 8, (uint64_t) 0);
+ return static_cast<U>(~tmp) << std::max(s, 0);
} else {
// Flipping only first bit.
- return (static_cast<U>(tmp) << std::max((sizeof(U) - sizeof(T)) * 8, (uint64_t) 0)) ^
- mask;
+ return (static_cast<U>(tmp) << std::max(s, 0)) ^ mask;
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/clone/ClusterLoadStatistic.java b/fe/fe-core/src/main/java/org/apache/doris/clone/ClusterLoadStatistic.java
index 14d7230..4626274 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/clone/ClusterLoadStatistic.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/clone/ClusterLoadStatistic.java
@@ -137,12 +137,14 @@ public class ClusterLoadStatistic {
beByTotalReplicaCountMaps.put(medium, beByTotalReplicaCount);
}
- // Actually the partition is [partition_id, index_id], aka pid.
- // Multimap<skew -> PartitionBalanceInfo>
- // PartitionBalanceInfo: <pid -> <partitionReplicaCount, beId>>
- // Only count available bes here, aligned with the beByTotalReplicaCountMaps.
- skewMaps = invertedIndex.buildPartitionInfoBySkew(beLoadStatistics.stream().filter(BackendLoadStatistic::isAvailable).
- map(BackendLoadStatistic::getBeId).collect(Collectors.toList()));
+ if (Config.tablet_rebalancer_type.equalsIgnoreCase("Partition")) {
+ // Actually the partition is [partition_id, index_id], aka pid.
+ // Multimap<skew -> PartitionBalanceInfo>
+ // PartitionBalanceInfo: <pid -> <partitionReplicaCount, beId>>
+ // Only count available bes here, aligned with the beByTotalReplicaCountMaps.
+ skewMaps = invertedIndex.buildPartitionInfoBySkew(beLoadStatistics.stream().filter(BackendLoadStatistic::isAvailable).
+ map(BackendLoadStatistic::getBeId).collect(Collectors.toList()));
+ }
}
/*
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org