Merge pull request #22220 from pauldg/fix/distributed-objectstore-start-propagation

Propagate `start()` to backends in `DistributedObjectStore`
This commit is contained in:
Marius van den Beek
2026-03-24 15:53:32 +01:00
committed by GitHub
2 changed files with 17 additions and 1 deletions
+4
View File
@@ -1482,6 +1482,10 @@ class DistributedObjectStore(NestedObjectStore):
as_dict["backends"] = backends
return as_dict
def start(self):
for backend in self.backends.values():
backend.start()
def shutdown(self):
"""Shut down. Kill the free space monitor if there is one."""
super().shutdown()
+13 -1
View File
@@ -6,7 +6,10 @@ from tempfile import (
mkdtemp,
mkstemp,
)
from unittest.mock import patch
from unittest.mock import (
MagicMock,
patch,
)
from uuid import uuid4
import pytest
@@ -514,6 +517,15 @@ def test_distributed_store_with_cache_targets():
assert len(object_store.cache_targets()) == 2
def test_distributed_store_start_propagates_to_backends():
with TestConfig(DISTRIBUTED_TEST_CONFIG) as (_, object_store):
for backend in object_store.backends.values():
backend.start = MagicMock()
object_store.start()
for backend in object_store.backends.values():
backend.start.assert_called_once()
HIERARCHICAL_MUST_HAVE_UNIFIED_QUOTA_SOURCE = """<?xml version="1.0"?>
<object_store type="hierarchical" private="true">
<backends>