[extractPatch] add process lock for db operation