Skip to content

Allocation manager inference depends on the classpath location name #1469

Closed

Description

@jbonofre

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.

Follow-up to #1461.

Activity

  1. added this to the 20.0.0 milestone on Nov 13, 2026
  2. added a commit that references this issue on Nov 13, 2026
  3. added a commit that references this issue on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions