Skip to content

Fix Vote History sorting#5927

Open
pawelperek-da wants to merge 3 commits into
mainfrom
pawel/vote-history-sort
Open

Fix Vote History sorting#5927
pawelperek-da wants to merge 3 commits into
mainfrom
pawel/vote-history-sort

Conversation

@pawelperek-da

@pawelperek-da pawelperek-da commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #5692

Before:
Screenshot 2026-06-12 at 13 21 48

After:
Screenshot 2026-06-12 at 13 32 16

Pull Request Checklist

Cluster Testing

  • If a cluster test is required, comment /cluster_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If an upgrade test is required, comment /upgrade_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a hard-migration test is required (from the latest release), comment /hdm_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a logical synchronizer upgrade test is required (from canton-3.5), comment /lsu_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.

PR Guidelines

  • Include any change that might be observable by our partners or affect their deployment in the release notes.
  • Specify fixed issues with Fixes #n, and mention issues worked on using #n
  • Include a screenshot for frontend-related PRs - see README or use your favorite screenshot tool

Merge Guidelines

  • Make the git commit message look sensible when squash-merging on GitHub (most likely: just copy your PR description).

Signed-off-by: Paweł Perek <pawel.perek@digitalasset.com>
@pawelperek-da pawelperek-da marked this pull request as ready for review June 11, 2026 21:19
Signed-off-by: Paweł Perek <pawel.perek@digitalasset.com>
Signed-off-by: Paweł Perek <pawel.perek@digitalasset.com>
createAction = sqlu"""
create index concurrently if not exists scan_txlog_store_sid_en_vot
on scan_txlog_store (store_id, entry_number desc)
create index concurrently if not exists scan_txlog_store_sid_rt_en_vot

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rautenrieth-da could you take a look if that's a correct way to remove unused indices? We didn't use IndexAction.Drop before but AFAIU that's the way

case Some(a) => Some(sql"""entry_number < $a""")
case Some(a) =>
Some(
sql"""(record_time, entry_number) < ((select record_time from #$txLogTableName where store_id = $txLogStoreId and entry_number = $a), $a)"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you check the plane for this? the SQL query looks weird to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix sorting in Vote history's infinite scroll

2 participants