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

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


The following commit(s) were added to refs/heads/master by this push:
     new 051c93c985d HBASE-30100 Fix misleading Javadoc for Table.batch about 
null in results array (#8109)
051c93c985d is described below

commit 051c93c985ddbd28e9210bafd15fa53179847f69
Author: Junegunn Choi <[email protected]>
AuthorDate: Wed Apr 22 10:06:52 2026 +0900

    HBASE-30100 Fix misleading Javadoc for Table.batch about null in results 
array (#8109)
    
    The Javadoc claimed a null in the result array means the action failed even
    after retries. This has been wrong since HBASE-6295 (0.96.0): per-action
    failures now store the Throwable in the slot, not null. The only remaining
    case where null appears is when the batch is rejected before dispatch by
    synchronous input validation in RawAsyncTableImpl.batch (e.g.,
    IllegalArgumentException from validateMutation), in which case all slots
    will be null and no retries are attempted.
    
    Signed-off-by: Dávid Paksy <[email protected]>
---
 .../src/main/java/org/apache/hadoop/hbase/client/Table.java   | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
index 907e3d1a704..5616231fe5f 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Table.java
@@ -114,9 +114,14 @@ public interface Table extends Closeable {
    * Put had put.
    * @param actions list of Get, Put, Delete, Increment, Append, RowMutations.
    * @param results Empty Object[], same size as actions. Provides access to 
partial results, in
-   *                case an exception is thrown. A null in the result array 
means that the call for
-   *                that action failed, even after retries. The order of the 
objects in the results
-   *                array corresponds to the order of actions in the request 
list.
+   *                case an exception is thrown. On per-action failure after 
retries, the
+   *                corresponding slot contains the Throwable (typically an 
IOException). On
+   *                success, the slot contains a {@link Result} (possibly 
empty for a Get with no
+   *                match, or empty for successful mutations). A null slot may 
appear if the entire
+   *                batch was rejected before dispatch (for example, 
IllegalArgumentException from
+   *                input validation), in which case all slots will be null. 
The order of the
+   *                objects in the results array corresponds to the order of 
actions in the request
+   *                list.
    * @since 0.90.0
    */
   default void batch(final List<? extends Row> actions, final Object[] results)

Reply via email to