Skip to content

Commit 3bcc3de

Browse files
author
Carlos Sánchez
committed
docs: explain why the post-fork hook reads store._registry
Signed-off-by: Carlos Sánchez <carlos.sancheza@cabify.com>
1 parent b891917 commit 3bcc3de

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎sdk/python/feast/feature_server.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,9 @@ def load(self):
13011301

13021302
def _gunicorn_post_fork(store: "feast.FeatureStore", server, worker):
13031303
"""Give each Gunicorn worker its own registry connections after fork."""
1304+
# store._registry and not store.registry: a worker that inherited no
1305+
# registry builds its own on first use, with its own connections, so
1306+
# this hook must not build one here.
13041307
if store._registry is not None:
13051308
store._registry.reset_after_fork()
13061309

0 commit comments

Comments
 (0)