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

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


The following commit(s) were added to refs/heads/master by this push:
     new 89dfe86ae [AMORO-3009] Treat read and write cost as the same when 
evaluating optimizing (#3010)
89dfe86ae is described below

commit 89dfe86aef9ded30f95d06671280c6e5a29178ec
Author: Congxian Qiu <[email protected]>
AuthorDate: Fri Jul 5 14:35:17 2024 +0800

    [AMORO-3009] Treat read and write cost as the same when evaluating 
optimizing (#3010)
---
 .../apache/amoro/server/optimizing/plan/CommonPartitionEvaluator.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/optimizing/plan/CommonPartitionEvaluator.java
 
b/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/optimizing/plan/CommonPartitionEvaluator.java
index df4403548..6ed8214b1 100644
--- 
a/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/optimizing/plan/CommonPartitionEvaluator.java
+++ 
b/amoro-ams/amoro-ams-server/src/main/java/org/apache/amoro/server/optimizing/plan/CommonPartitionEvaluator.java
@@ -263,11 +263,11 @@ public class CommonPartitionEvaluator implements 
PartitionEvaluator {
   @Override
   public long getCost() {
     if (cost < 0) {
-      // We estimate that the cost of writing is 3 times that of reading.
+      // We estimate that the cost of writing is the same as reading.
       // When rewriting the Position delete file, only the primary key field 
of the segment file
       // will be read, so only one-tenth of the size is calculated based on 
the size.
       cost =
-          (fragmentFileSize + rewriteSegmentFileSize + 
undersizedSegmentFileSize) * 4
+          (fragmentFileSize + rewriteSegmentFileSize + 
undersizedSegmentFileSize) * 2
               + rewritePosSegmentFileSize / 10
               + posDeleteFileSize
               + equalityDeleteFileSize;

Reply via email to