davisusanibar commented on code in PR #37723:
URL: https://github.com/apache/arrow/pull/37723#discussion_r1445225504
##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/Accountant.java:
##########
@@ -73,12 +74,15 @@ public Accountant(Accountant parent, String name, long
reservation, long maxAllo
this.allocationLimit.set(maxAllocation);
if (reservation != 0) {
+ if (parent == null) {
+ throw new IllegalArgumentException(String.valueOf("Accountant(parent)
must not be null"));
+ }
Review Comment:
Changed
##########
java/memory/memory-core/src/main/java/org/apache/arrow/memory/AllocationManager.java:
##########
@@ -133,9 +135,11 @@ void release(final BufferLedger ledger) {
// remove the <BaseAllocator, BufferLedger> mapping for the allocator
// of calling BufferLedger
Preconditions.checkState(map.containsKey(allocator),
- "Expecting a mapping for allocator and reference manager");
+ "Expecting a mapping for allocator and reference manager");
final BufferLedger oldLedger = map.remove(allocator);
-
+ if (oldLedger == null) {
+ throw new
IllegalArgumentException(String.valueOf("BufferLedger(oldLedger) must not be
null"));
+ }
Review Comment:
Added
--
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]