From 99c605b6aa7ec79bfb329a36d7d89a6eff6605c9 Mon Sep 17 00:00:00 2001 From: heyuchen Date: Wed, 13 Oct 2021 09:44:59 +0800 Subject: [PATCH 1/3] feat: handle ERR_DISK_INSUFFICIENT --- .../java/com/xiaomi/infra/pegasus/client/PegasusTable.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/xiaomi/infra/pegasus/client/PegasusTable.java b/src/main/java/com/xiaomi/infra/pegasus/client/PegasusTable.java index b89942bd..6b4ca009 100644 --- a/src/main/java/com/xiaomi/infra/pegasus/client/PegasusTable.java +++ b/src/main/java/com/xiaomi/infra/pegasus/client/PegasusTable.java @@ -1932,6 +1932,9 @@ public void handleReplicaException( case ERR_PARENT_PARTITION_MISUSED: message = " The partition split finished, is updating config!"; break; + case ERR_DISK_INSUFFICIENT: + message = " The replica server disk space is insufficient"; + break; } promise.setFailure( new PException(new ReplicationException(op.rpc_error.errno, header + message))); From ea6baa5f3732054d4d4d04fa6564f7213c2dde59 Mon Sep 17 00:00:00 2001 From: heyuchen Date: Wed, 13 Oct 2021 10:04:26 +0800 Subject: [PATCH 2/3] Triggle rebuild From 05bd60e74e331e8576e29168c8ddbecfa847ecb8 Mon Sep 17 00:00:00 2001 From: heyuchen Date: Wed, 13 Oct 2021 10:11:11 +0800 Subject: [PATCH 3/3] update --- .../xiaomi/infra/pegasus/client/PegasusClientInterface.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/xiaomi/infra/pegasus/client/PegasusClientInterface.java b/src/main/java/com/xiaomi/infra/pegasus/client/PegasusClientInterface.java index 3af2de70..b4ac5cdf 100644 --- a/src/main/java/com/xiaomi/infra/pegasus/client/PegasusClientInterface.java +++ b/src/main/java/com/xiaomi/infra/pegasus/client/PegasusClientInterface.java @@ -69,8 +69,7 @@ public PegasusTableInterface openTable(String tableName, int backupRequestDelayM * administrator * @param tableOptions control the table feature, such as open backup-request, compress and etc, * see {@link TableOptions} - * @return - * @throws PException + * @throws PException throws exception if any error occurs. */ public PegasusTableInterface openTable(String tableName, TableOptions tableOptions) throws PException;