Add API to wait for pending commit callbacks