danepitkin commented on code in PR #37723:
URL: https://github.com/apache/arrow/pull/37723#discussion_r1374902955


##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/Accountant.java:
##########
@@ -73,12 +74,14 @@ public Accountant(Accountant parent, String name, long 
reservation, long maxAllo
     this.allocationLimit.set(maxAllocation);
 
     if (reservation != 0) {
-      // we will allocate a reservation from our parent.
-      final AllocationOutcome outcome = parent.allocateBytes(reservation);
-      if (!outcome.isOk()) {
-        throw new OutOfMemoryException(String.format(
-            "Failure trying to allocate initial reservation for Allocator. " +
-                "Attempted to allocate %d bytes.", reservation), 
outcome.getDetails());
+      if (parent != null) {

Review Comment:
   +1 Good catch.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to