add lock checking for record getting; fix some safe container writing check
Merge branch 'master' into mapdb2