Skip to content

Commit 8de67ca

Browse files
authored
Add comments to newBitMapAllocator in pkg/ddc/base/portallocator/bitmap_allocator.go. (#5737)
Signed-off-by: qnsy729 <735178559@qq.com>
1 parent 355370f commit 8de67ca

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pkg/ddc/base/portallocator/bitmap_allocator.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ func (b *BitMapAllocator) needResetReservedPorts() bool {
3535
return true
3636
}
3737

38+
// newBitMapAllocator creates a bitmap-based port allocator for the given port range.
39+
// It initializes the underlying allocator and returns a BitMapAllocator instance.
40+
// It returns an error if the allocator cannot be created.
3841
func newBitMapAllocator(pr *net.PortRange, log logr.Logger) (BatchAllocatorInterface, error) {
3942
// TODO passing offset value.
4043
alloc, err := portallocator.New(*pr, func(max int, rangeSpec string, offset int) (allocator.Interface, error) {

0 commit comments

Comments
 (0)