Lock the whole cleanTable operation