deduplicateWrites