fix: propagate start() to backends in DistributedObjectStore

DistributedObjectStore inherited the no-op base ObjectStore.start(),
so IRODSObjectStore.start() was never called after fork. This meant
the ConnectionPoolMonitorThread never started, causing stale iRODS
connections to accumulate. When get_connection() found them, it called
conn.disconnect() -> ssl.unwrap() on a dead socket, blocking for the
full socket timeout before raising TimeoutError.

Fixes #22219
This commit is contained in:
Paul De Geest
2026-03-22 19:56:55 +01:00
parent e5e064f3ef
commit 0abd4b66a3
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>