Geo: insert_for_model_ids aborts the whole batch when a registry row already exists
Problem
Geo::BaseRegistry.insert_for_model_ids (ee/app/models/geo/base_registry.rb#L49) uses bulk_insert!, which defaults to on_duplicate: :raise. On registries with a unique index on the model FK, a race between RegistryConsistencyWorker and the sync path's find_or_initialize_by raises RecordNotUnique and aborts the whole batch (up to 1,000 rows).
The batcher advances its cursor before the insert runs (base_batcher.rb#L76), so the failed range is skipped - those records stay unregistered and unsynced until the batcher wraps the whole table, which takes days on large registries.
Most registries already have such an index, so this is pre-existing. %19.5 adds three more (!246511 (merged), !255707 (merged), !255717 (merged)). Spotted by @dbalexandre in review.
Proposal
bulk_insert!(records, returns: :ids, skip_duplicates: true)ON CONFLICT DO NOTHING: the conflicting row is skipped, the rest of the batch inserts. Correct for a consistency worker (a conflict means the record is already registered), free (no extra query), and a no-op on tables without a unique FK index - safe for all registries and deploy orderings.
One line plus a spec.
Context
Unique index issues: #606428 (closed), #606429 (closed), #606430 (closed)