Skip to content

Commit

Permalink
[Backport release-rogue] Add index on quorum_proposals.leaf_hash (#…
Browse files Browse the repository at this point in the history
…2214)

Add index on `quorum_proposals.leaf_hash` (#2208)

We look up by this column during state reconstruction, so we should
probably index it. The unique index will also prevent us from inserting
quorum proposals with different views but the same hash, which should not
be possible and would be a logic error if it happened.

(cherry picked from commit ee6f7d4)

Co-authored-by: Jeb Bearer <jeb.bearer@gmail.com>
  • Loading branch information
github-actions[bot] and jbearer authored Oct 24, 2024
1 parent 5a4f21b commit 4b9cd2a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE UNIQUE INDEX quorum_proposals_leaf_hash_idx ON quorum_proposals (leaf_hash);

0 comments on commit 4b9cd2a

Please sign in to comment.