{"record":{"id":"a7b9cd6d7e634633","repo":"apache/seatunnel","slug":"failed-to-list-offsets-for-table-s-buckets-s","errorCode":null,"errorMessage":"Failed to list offsets for table %s buckets %s","messagePattern":"Failed to list offsets for table (.+?) buckets (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-fluss/src/main/java/org/apache/seatunnel/connectors/seatunnel/fluss/source/FlussAdminClient.java","lineNumber":121,"sourceCode":"                listOffsetsAsync(tablePath, buckets, new OffsetSpec.LatestSpec());\n        return new BucketBounds(\n                awaitOffsets(earliest, tablePath, buckets),\n                awaitOffsets(latest, tablePath, buckets));\n    }\n\n    private CompletableFuture<Map<Integer, Long>> listOffsetsAsync(\n            TablePath tablePath, List<Integer> buckets, OffsetSpec spec) {\n        return admin.listOffsets(toFlussTablePath(tablePath), buckets, spec).all();\n    }\n\n    private Map<Integer, Long> awaitOffsets(\n            CompletableFuture<Map<Integer, Long>> future,\n            TablePath tablePath,\n            List<Integer> buckets) {\n        try {\n            return future.get();\n        } catch (Exception e) {\n            throw wrap(\n                    String.format(\n                            \"Failed to list offsets for table %s buckets %s\",\n                            tablePath.getFullName(), buckets),\n                    e);\n        }\n    }\n\n    static final class BucketBounds {\n        final Map<Integer, Long> earliest;\n        final Map<Integer, Long> latest;\n\n        BucketBounds(Map<Integer, Long> earliest, Map<Integer, Long> latest) {\n            this.earliest = earliest;\n            this.latest = latest;\n        }\n    }\n\n    private static IllegalStateException wrap(String message, Exception e) {","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-fluss/src/main/java/org/apache/seatunnel/connectors/seatunnel/fluss/source/FlussAdminClient.java#L103-L139","documentation":"awaitOffsets waits on a CompletableFuture of per-bucket offsets (earliest/latest/bounds) from the Fluss admin. Any exceptional completion, timeout, or interruption is wrapped as 'Failed to list offsets for table <db.table> buckets [...]'.","triggerScenarios":"The offsets future (from earliestOffsets/latestOffsets/bucketBounds) fails: Fluss coordinator/tablet server unreachable, table's buckets not yet created or deleted, request timeout, or thread interruption while future.get() blocks.","commonSituations":"Starting a source against a table that has no created buckets (new/empty table misconfig), cluster node down, or long request latency exceeding the client timeout under load.","solutions":["Check Fluss cluster health (coordinator + tablet servers) and that the table's buckets exist","Inspect the wrapped cause — timeout vs connection refused vs NoSuchBucketException point to different fixes","Increase the Fluss client request timeout if latency is the issue","Verify table name/bucket count config matches the actual cluster state"],"exampleFix":"// before\n\"scan.startup.mode\" = \"earliest\" on table created without buckets\n// after\nCREATE TABLE mydb.orders (...) WITH ('bucket.num' = '3');  // ensure buckets exist before syncing","handlingStrategy":"retry","validationCode":"// verify table and buckets exist before reading offsets\nTableInfo info = admin.getTableInfo(tablePath); // fails early with a clearer error\n// assert bucketCount matches configured parallelism","typeGuard":null,"tryCatchPattern":"try {\n    Map<Integer, Long> offsets = awaitOffsets(future, tablePath, buckets);\n} catch (SeaTunnelRuntimeException e) {\n    if (isTransient(e.getCause())) { /* retry with backoff */ }\n    else throw e; // bucket/table state problems are not retryable\n}","preventionTips":["Create tables with the intended bucket.num before running sync jobs","Size source parallelism to the actual bucket count","Set adequate Fluss client request timeouts for cluster latency","Monitor coordinator/tablet-server availability"],"tags":["fluss","offsets","admin-client"],"backgroundTag":"request-timeout","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}