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 bff6ede  add data size field for partition cache (#6026)
bff6ede is described below

commit bff6ede94ee54c7a556bfedbab39c6aa243d5b11
Author: xinghuayu007 <[email protected]>
AuthorDate: Fri Jun 18 11:40:00 2021 +0800

    add data size field for partition cache (#6026)
    
    Co-authored-by: wangxixu <[email protected]>
---
 .../src/main/java/org/apache/doris/qe/cache/RowBatchBuilder.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/RowBatchBuilder.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/RowBatchBuilder.java
index c468bac..4f8b832 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/RowBatchBuilder.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/RowBatchBuilder.java
@@ -167,13 +167,17 @@ public class RowBatchBuilder {
             Long key = entry.getKey();
             PartitionRange.PartitionSingle partition = cachePartMap.get(key);
             partitionRowList = entry.getValue();
+            int data_size = 0;
+            for (byte[] buf : partitionRowList) {
+                data_size += buf.length;
+            }
             updateRequest = updateRequest.toBuilder()
                     .addValues(InternalService.PCacheValue.newBuilder()
                             .setParam(InternalService.PCacheParam.newBuilder()
                                     .setPartitionKey(key)
                                     
.setLastVersion(partition.getPartition().getVisibleVersion())
                                     
.setLastVersionTime(partition.getPartition().getVisibleVersionTime())
-                                    .build()).addAllRows(
+                                    .build()).setDataSize(dataSize).addAllRows(
                                     partitionRowList.stream().map(row -> 
ByteString.copyFrom(row))
                                             
.collect(Collectors.toList()))).build();
         }

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to