[Bugfix] Skip HWR store-size scans when no limit is configured (#7131)

Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
Hongsheng Liu authored and GitHub committed 2026-09-08 22:54:49 +08:00
1 parent a31690041d
commit 7422a85cc7
1 file changed
+4 -2
@@ -1247,8 +1247,10 @@ class FilesystemHostWeightStore:
retryable=True,
)
)
store_bytes = self._tree_bytes(self.root)
if policy.max_store_bytes is not None and store_bytes + additional_bytes > policy.max_store_bytes:
if (
policy.max_store_bytes is not None
and self._tree_bytes(self.root) + additional_bytes > policy.max_store_bytes
):
raise HostWeightError(
_failure(
ResolutionStage.CAPACITY,