You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allocation manager inference depends on the classpath location name #1469
Describe the bug, including details regarding any error messages, version, and platform.
When no allocation manager type is set, CheckAllocator.check() finds a DefaultAllocationManagerFactory resource on the classpath, then picks the factory class by searching the resource location for memory-core, memory-unsafe or memory-netty, in that order.
This has a few issues:
The location name decides the factory, not the resource that was actually found. A Netty or Unsafe factory loaded from a location that contains memory-core (a directory or a repackaged jar name) is inferred as the memory-core test factory, and creating a RootAllocator fails with Unable to instantiate Allocation Manager for org.apache.arrow.memory.DefaultAllocationManagerFactory.
When both arrow-memory-unsafe and arrow-memory-netty are on the classpath, Unsafe is chosen without any warning.
The log prints the factory class name, not the Netty / Unsafe value accepted by arrow.allocation.manager.type / ARROW_ALLOCATION_MANAGER_TYPE, and the inference is logged on two lines (CheckAllocator and DefaultAllocationManagerOption).
The location in the CheckAllocator log is cut at the first memory found in the path.
I expect the factory to be inferred from the resource that was found, a warning when several allocation manager types are on the classpath, and a single log line with the inferred type and its location.
Activity
apacheGH-1469: Fix Spotless formatting in TestCheckAllocator
apacheGH-1469: Infer the allocation manager from the factory found on…