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 1690c5563a5 [enhancement](balance) change unnecessary write locks to
read locks in cloud balance (#40633)
1690c5563a5 is described below
commit 1690c5563a561baa806755ab0583a0a8e312a86a
Author: Luwei <[email protected]>
AuthorDate: Wed Sep 11 22:16:46 2024 +0800
[enhancement](balance) change unnecessary write locks to read locks in
cloud balance (#40633)
---
.../java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java
b/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java
index ae34c6b722f..093079437a5 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudTabletRebalancer.java
@@ -616,10 +616,7 @@ public class CloudTabletRebalancer extends MasterDaemon {
continue;
}
OlapTable olapTable = (OlapTable) table;
- if (!table.writeLockIfExist()) {
- continue;
- }
-
+ table.readLock();
try {
for (Partition partition : olapTable.getAllPartitions()) {
for (MaterializedIndex index :
partition.getMaterializedIndices(IndexExtState.VISIBLE)) {
@@ -630,7 +627,7 @@ public class CloudTabletRebalancer extends MasterDaemon {
} // end for indices
} // end for partitions
} finally {
- table.writeUnlock();
+ table.readUnlock();
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]