Startup deletes the work queue's keys from before it moved from pipeline: to queue: (stream, timers, dead letters, parked lists, done markers), logged with what they held; an old stream still holding undelivered work stays, is logged as an error, and counts as queued work for the keys it names
This commit is contained in:
@@ -317,7 +317,10 @@ async def lifespan(app: FastAPI) -> AsyncIterator[None]:
|
||||
event_bus.flow_id_of = lambda key: store.key_index().get(key, key)
|
||||
state = _state_backend()
|
||||
queue = _work_queue()
|
||||
# Then the rest of it, before anything reads alerts, devices, modules,
|
||||
# What the queue left among the state keys before it had a root of
|
||||
# its own, which a rename's state step would refuse.
|
||||
await run_in_threadpool(queue.drop_legacy)
|
||||
# Then the rest of the rename, before anything reads alerts, devices, modules,
|
||||
# metrics, flows or runs. Until it is finished nothing is served.
|
||||
await retry_until_done(lambda: recover_runtime(state, queue), event_bus)
|
||||
# Work that arrived while a rename held the queue, which a crash
|
||||
|
||||
Reference in New Issue
Block a user