Loading from file sometimes creates a duplicate key

Since we can't lock code, the load sometimes creates duplicate records since it can insert a duplicate in between checking and inserting.