File tree Expand file tree Collapse file tree
pkg/ddc/base/portallocator Expand file tree Collapse file tree Original file line number Diff line number Diff 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)
7777func (b * BitMapAllocator ) AllocateBatch (portNum int ) (ports []int , err error ) {
7878 var availPort int
7979
You can’t perform that action at this time.
0 commit comments