{"record":{"id":"0722b79e3d0e3fcf","repo":"apache/beam","slug":"error-closing-bufferallocator","errorCode":null,"errorMessage":"Error closing BufferAllocator","messagePattern":"Error closing BufferAllocator","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/java/io/arrow-flight/src/main/java/org/apache/beam/sdk/io/arrowflight/ArrowFlightIO.java","lineNumber":504,"sourceCode":"          stream.close();\n        }\n      } catch (Exception e) {\n        LOG.warn(\"Error closing FlightStream\", e);\n      }\n      try {\n        if (client != null) {\n          client.close();\n        }\n      } catch (InterruptedException e) {\n        Thread.currentThread().interrupt();\n        LOG.warn(\"Interrupted closing FlightClient\", e);\n      }\n      try {\n        if (allocator != null) {\n          allocator.close();\n        }\n      } catch (Exception e) {\n        LOG.warn(\"Error closing BufferAllocator\", e);\n      }\n    }\n\n    @Override\n    public BoundedSource<Row> getCurrentSource() {\n      return currentSource;\n    }\n  }\n\n  // ======================== WRITE ========================\n\n  // TODO: Return a write result with failed rows for dead-letter handling instead of PDone.\n  @AutoValue\n  public abstract static class Write extends PTransform<PCollection<Row>, PDone> {\n\n    abstract @Nullable String host();\n\n    abstract int port();","sourceCodeStart":486,"sourceCodeEnd":522,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/arrow-flight/src/main/java/org/apache/beam/sdk/io/arrowflight/ArrowFlightIO.java#L486-L522","documentation":"WARN logged in ArrowFlightIO reader's close(): closing the Arrow BufferAllocator raised an exception. Like the FlightStream/FlightClient cleanup above it, the error is caught and logged rather than propagated, so a failing allocator release (often a symptom of an outstanding buffer/memory leak elsewhere) does not prevent the remaining teardown steps.","triggerScenarios":"Thrown at sdks/java/io/arrow-flight/src/main/java/org/apache/beam/sdk/io/arrowflight/ArrowFlightIO.java:504 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Investigate Arrow memory leaks (unclosed Arrow records/batches) which commonly cause allocator close failures","Verify allocator children are closed before the root allocator"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}