From 2158e163f7459bbd8e5a9c16023e38b00e1b6a68 Mon Sep 17 00:00:00 2001 From: Chen Honghai <68315469+LuuucasChen@users.noreply.github.com> Date: Tue, 23 Jan 2024 04:49:09 +0800 Subject: [PATCH] Update the solution when a file cannot be located. (#5223) Change the solution when a file cannot be located. --- .../java/client/src/main/java/seaweedfs/client/SeaweedRead.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java b/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java index 41033befb..031e904d2 100644 --- a/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java +++ b/other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java @@ -69,7 +69,7 @@ public class SeaweedRead { if (locations == null || locations.getLocationsCount() == 0) { LOG.error("failed to locate {}", chunkView.fileId); volumeIdCache.clearLocations(volumeId); - return 0; + throw new IOException("failed to locate file"); } int len = readChunkView(filerClient, startOffset, buf, chunkView, locations);