[go: up one dir, main page]

Skip to content

Add necessary indexes to replication queue

Currently the replication_queue has two indexes:

  1. "replication_queue_pkey" PRIMARY KEY, btree (id)
  2. "virtual_target_on_replication_queue_idx" btree ((job ->> 'virtual_storage'::text), (job ->> 'target_node_storage'::text))

The Dequeue seems to filter by some columns which are not indexed

  1. state
  2. lock_id

Not having these indexed potentially forces more rows to be checked. With !2457 (merged) in place, I guess the impact will be smaller as we would not have a lot of records to shift through in any case.

cc @zj-gitlab

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information