1954
}
1955
1957
>
foundDbq, ok := pm.versionedQueues[version]
1958
>
if ok && foundDbq == unloadedDbq {
1959
>
// Zero logical backlog metrics before removing from map to prevent stale gauges.
1960
>
pm.emitZeroLogicalBacklogForQueue(version, foundDbq)
1961
>
delete(pm.versionedQueues, version)
1962
>
}
1963
>
pm.versionedQueuesLock.Unlock()
1964
>
1965
>
unloadedDbq.Stop(unloadCause)
1966
>
1967
>
// Here we're unloading a versioned queue but not unloading the whole partition. With new
1968
>
// matcher, the matcher may be holding tasks that came from other versioned queues
1969
>
// (including the default queue). We need to ensure we send those tasks back to get
1970
>
// reprocessed (which may end up reloading a new instance of this queue).
1971
>
unloadedDbq.ReprocessRedirectedTasksAfterStop()
1972
}
1973