[go: up one dir, main page]

housekeeping: Add housekeeping middleware

#5709

This MR adds HousekeepingMiddleware which intercepts gRPC requests, independent of whether transactions are enabled. The scheduler:

  • decides whether to invoke OptimizeRepository based on a configurable housekeeping interval.
  • ensures only a single OptimizeRepository job is executing concurrently.

The middleware is guarded behind a new feature flag in case it results in performance degradation. If the middleware encounters errors, they are logged and the handler is invoked immediately, short-circuiting the middleware logic.

Edited by James Liu

Merge request reports

Loading