Skip to content

Shorten interactive transactions when persisting txs - #1145

Open
Klakurka wants to merge 1 commit into
masterfrom
cursor/shorten-tx-persist-transactions-22bf
Open

Klakurka wants to merge 1 commit into
masterfrom
cursor/shorten-tx-persist-transactions-22bf

Conversation

@Klakurka

@Klakurka Klakurka commented Nov 7, 2026

Copy link
Copy Markdown
Member

Related to #

Description

Bulk transaction persist held one pool connection for the whole classify, insert, and per-row update, with a 45-second interactive-transaction timeout.

Existing-row lookup and status updates now run outside that transaction. Rows that share the same confirmed, timestamp, and orphaned values are updated together with updateMany. Inserts still use one interactive transaction, with the timeout lowered to 15 seconds.

Test plan

  • Inserts still create the transaction and its inputs together.
  • Status updates still change confirmed, timestamp, and orphaned, grouped into one statement per distinct value set.
  • persistManyTransactionRows is not exported, so this path has no direct unit test. Review the grouping key and the insert transaction.
Open in Web Open in Cursor 

Classify existing rows and apply status updates outside the interactive
transaction, group identical updates into updateMany, and lower the
create-path timeout from 45s to 15s so pool connections are released sooner.

Co-authored-by: David <Klakurka@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cd51a48d-9849-4403-9a1e-7594679b7d95
Commits

Reviewing files that changed from the base of the PR and between cac26a3 and dd181b3.

Files selected for processing: 2

  • constants/index.ts
  • services/transactionService.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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.

2 participants