                              shutdown-for-ex)
         (start-garbage-collection context job-pool
                                   write-db-cfgs write-db-pools write-db-lock-statuses
-                                  shutdown-for-ex)
+                                  shutdown-for-ex
+                                  initial-gc-finished?)
 
         (-> context
             (assoc :job-pool job-pool


(defn start-garbage-collection
  [{:keys [clean-lock stop-status] :as context}
   job-pool db-configs db-pools db-lock-statuses shutdown-for-ex]
  (doseq [[cfg db lock-status] (map vector db-configs db-pools db-lock-statuses)
          :let [interval (to-millis (:gc-interval cfg))]
          :when (pos? interval)]

                   _ write-db-pools :error close-write-dbs

                   write-db-lock-statuses (repeatedly (count write-db-pools)
                                                      database-lock-status)
                   initial-gc-finished? (promise)]

        (init-metrics read-db write-db-pools)

