Skip to content

Optimize JdbcStore range reads and write fallback handling - #1389

Open
chrjohn wants to merge 1 commit into
masterfrom
perf/jdbcstore-read-write-path
Open

chrjohn wants to merge 1 commit into
masterfrom
perf/jdbcstore-read-write-path

Conversation

@chrjohn

@chrjohn chrjohn commented Nov 27, 2026

Copy link
Copy Markdown
Member

Summary:

  • Add fetch-size hints for JdbcStore range reads to reduce overhead on larger resend windows.
  • Make reset() execute message delete + session update in a single transaction/commit.
  • Keep insert-first write path, but only use update fallback when insert fails with duplicate-key violations.
  • Use executeUpdate() consistently on insert/update write paths.

Why:
These changes reduce avoidable JDBC overhead in hot paths (large reads and reset writes) and prevent extra update attempts for non-duplicate SQL failures.

Validation:

  • ./mvnw -pl quickfixj-core -Dtest=JdbcStoreTest,JdbcStoreLegacyTest test -Dsurefire.failIfNoSpecifiedTests=false -PskipBundlePlugin -Dmaven.javadoc.skip=true

Use fetch-size hints for ranged message reads, run reset updates in a single transaction, and limit message-update fallback to duplicate-key insert failures while using executeUpdate() for both insert and update paths.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Nov 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.63%. Comparing base (2b3d008) to head (c3ed242).

Files with missing lines Patch % Lines
...ickfixj-core/src/main/java/quickfix/JdbcStore.java 42.85% 15 Missing and 5 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1389      +/-   ##
============================================
- Coverage     71.74%   71.63%   -0.11%     
- Complexity     2307     2310       +3     
============================================
  Files           162      162              
  Lines          9106     9135      +29     
  Branches       1193     1195       +2     
============================================
+ Hits           6533     6544      +11     
- Misses         2120     2135      +15     
- Partials        453      456       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant