diff --git a/pkg/ddc/base/portallocator/bitmap_allocator.go b/pkg/ddc/base/portallocator/bitmap_allocator.go index 76759b89003..df290bee94e 100644 --- a/pkg/ddc/base/portallocator/bitmap_allocator.go +++ b/pkg/ddc/base/portallocator/bitmap_allocator.go @@ -35,6 +35,9 @@ func (b *BitMapAllocator) needResetReservedPorts() bool { return true } +// newBitMapAllocator creates a bitmap-based port allocator for the given port range. +// It initializes the underlying allocator and returns a BitMapAllocator instance. +// It returns an error if the allocator cannot be created. func newBitMapAllocator(pr *net.PortRange, log logr.Logger) (BatchAllocatorInterface, error) { // TODO passing offset value. alloc, err := portallocator.New(*pr, func(max int, rangeSpec string, offset int) (allocator.Interface, error) {