From f0106ee0421c8cf01a5ac8af1d6fa7f901f79d3f Mon Sep 17 00:00:00 2001 From: chenqiang Date: Thu, 18 Jun 2026 21:20:18 +0800 Subject: [PATCH] Fix OperationWorkerPool to enqueue operations via items= kwarg OperationWorkerPool.__init__ passed its operations positionally to WorkerPool.__init__, whose second positional parameter is should_stop (items is the third). As a result operations were bound to should_stop and items stayed None, so no operation was ever added to the work queue and should_stop was set truthy. The worker only received the halt command, ParallelOperation's operations never ran, Operation.run() never assigned self.ret, and callers hit: AttributeError: 'SyncPackages' object has no attribute 'ret' This breaks gpexpand's first stage ("Syncing Apache Cloudberry extensions"): the exception is squashed to a WARNING and, more importantly, package/extension sync to new segment hosts silently never runs. This re-applies the fix from commit cd3c88f6e1e, which was reverted by the REL_16_9 merge (0f4cf8d5068). Pass operations as the items keyword so they are enqueued and should_stop stays False. --- gpMgmt/bin/gppylib/commands/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpMgmt/bin/gppylib/commands/base.py b/gpMgmt/bin/gppylib/commands/base.py index d455c6e2d13..e09dd40c061 100755 --- a/gpMgmt/bin/gppylib/commands/base.py +++ b/gpMgmt/bin/gppylib/commands/base.py @@ -230,7 +230,7 @@ def __init__(self, numWorkers=16, operations=None): if operations is not None: for operation in operations: self._spoof_operation(operation) - super(OperationWorkerPool, self).__init__(numWorkers, operations) + super(OperationWorkerPool, self).__init__(numWorkers, items=operations) def check_results(self): raise NotImplementedError("OperationWorkerPool has no means of verifying success.")