add todo to protect against race condition with leaked threads

This commit is contained in:
Christian Schwarz
2024-01-26 10:09:35 +00:00
parent cedc0376ff
commit 2b581eefa7

View File

@@ -969,6 +969,10 @@ class NeonEnvBuilder:
cleanup_error = e
if self.test_cgroup_dir is not None:
# TODO: ensure that we're the only python thread running;
# otherwise, if a test leaks a thread,
# our checking here would race with that other thread.
# => https://github.com/neondatabase/neon/issues/6486
log.info(f"check test runner cgroup for leaked processes: {self.test_cgroup_dir}")
procs_file = self.test_cgroup_dir / "cgroup.procs"
mypid = os.getpid()