fix bad race conditions in parallel schema upgrade, #29163