Added commitAndRestartTx to QueryContext