From a2a23e7fa4225233f494880c1f53eda9018bcbdc Mon Sep 17 00:00:00 2001 From: sssq-max <3203599225@qq.com> Date: Thu, 18 Jun 2026 17:58:56 +0800 Subject: [PATCH 1/2] Update random_allocator.go Add comments to Allocate in fluid/pkg/ddc/base/portallocator/random_allocator.go. Signed-off-by: sssq-max <3203599225@qq.com> --- pkg/ddc/base/portallocator/random_allocator.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/ddc/base/portallocator/random_allocator.go b/pkg/ddc/base/portallocator/random_allocator.go index 65c040436e9..ad96eeb1d9b 100644 --- a/pkg/ddc/base/portallocator/random_allocator.go +++ b/pkg/ddc/base/portallocator/random_allocator.go @@ -48,6 +48,7 @@ func newRandomAllocator(pr *net.PortRange, log logr.Logger) (*RandomAllocator, e }, nil } +// Allocate accepts the given port without performing allocation checks. func (r *RandomAllocator) Allocate(port int) error { // not judge whether port can be allocated or not return nil From 7a6445579565d529495f7a985a5285fbf2c36f70 Mon Sep 17 00:00:00 2001 From: sssq-max <3203599225@qq.com> Date: Sat, 20 Jun 2026 19:07:20 +0800 Subject: [PATCH 2/2] Update comment for Allocate in random_allocator.go. Signed-off-by: sssq-max <3203599225@qq.com> --- pkg/ddc/base/portallocator/random_allocator.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/ddc/base/portallocator/random_allocator.go b/pkg/ddc/base/portallocator/random_allocator.go index ad96eeb1d9b..72f211ec97e 100644 --- a/pkg/ddc/base/portallocator/random_allocator.go +++ b/pkg/ddc/base/portallocator/random_allocator.go @@ -48,7 +48,8 @@ func newRandomAllocator(pr *net.PortRange, log logr.Logger) (*RandomAllocator, e }, nil } -// Allocate accepts the given port without performing allocation checks. +// Allocate is a no-op for RandomAllocator. +// Individual port allocation checks are not currently required by this allocator. func (r *RandomAllocator) Allocate(port int) error { // not judge whether port can be allocated or not return nil