Skip to content

Commit 48a409f

Browse files
committed
Fix issues
1 parent 676bf47 commit 48a409f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/ddc/base/portallocator/bitmap_allocator.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ func (b *BitMapAllocator) Release(port int) error {
6363
}
6464

6565
// AllocateBatch allocates a batch of ports from the bitmap allocator.
66-
// This function attempts to allocate the specified number of consecutive ports and returns them as a slice.
66+
// This function attempts to allocate the specified number of ports and returns them as a slice.
6767
// If allocation fails for any reason (e.g., insufficient available ports), it will rollback all
6868
// previously allocated ports in this batch and exit the process with status code 1 to ensure
6969
// port allocation state consistency.
7070
//
7171
// Parameters:
72-
// - portNum (int): The number of ports to allocate
72+
// - portNum (int): The number of ports to allocate.
7373
//
7474
// Returns:
75-
// - ports ([]int): A slice containing the allocated port numbers
76-
// - err (error): Error if allocation fails (note: function exits process on failure)
75+
// - ports ([]int): A slice containing the allocated port numbers.
76+
// - err (error): Always nil if the function returns (note: function exits process on failure)
7777
func (b *BitMapAllocator) AllocateBatch(portNum int) (ports []int, err error) {
7878
var availPort int
7979

0 commit comments

Comments
 (0)