BUG: CORE-2925 Break up insert batch to 2k size to prevent OOM.

Do you need to call flush() between batches?