metadata lock design change, cleanup later