Fix multiple thread issues.

Fix multiple thread issues with bulk load and delete.