If backend is closed, the operations on backend in compact goroutine will panic. So this PR waits for compact goroutine to exit before close backend. This fixes the TestWorkflow failure too.
They used to be in key bucket, and make recover failed because they cannot be parsed as normal key.