add locks for Table and TableProvider