You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by wa...@apache.org on 2023/03/23 09:57:14 UTC

[incubator-pegasus] branch master updated: batchGetByPartitions (#1411)

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

wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new 576189319 batchGetByPartitions (#1411)
576189319 is described below

commit 576189319afa822f608958c4102d9056d9f12706
Author: WHBANG <38...@users.noreply.github.com>
AuthorDate: Thu Mar 23 17:57:06 2023 +0800

    batchGetByPartitions (#1411)
    
    https://github.com/apache/incubator-pegasus/issues/1410
    
    In batchGetByPartitions, once some exception happens (such as timeout), resultMapList
    will miss element which will lead to misalignment and IndexOutOfBoundsException. Just
    add an empty element for resultMapList to align it while exception happens.
---
 java-client/src/main/java/org/apache/pegasus/client/PegasusTable.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/java-client/src/main/java/org/apache/pegasus/client/PegasusTable.java b/java-client/src/main/java/org/apache/pegasus/client/PegasusTable.java
index c725fcb7d..ef27a706c 100644
--- a/java-client/src/main/java/org/apache/pegasus/client/PegasusTable.java
+++ b/java-client/src/main/java/org/apache/pegasus/client/PegasusTable.java
@@ -1234,6 +1234,8 @@ public class PegasusTable implements PegasusTableInterface {
         Throwable cause = fu.cause();
         partitionToPException.set(
             i, new PException("Get value of keys[" + i + "] failed: " + cause.getMessage(), cause));
+        Map<Pair<String, String>, byte[]> emptyMap = new HashMap<>();
+        resultMapList.add(emptyMap);
       }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org