Skip to content

Conversation

@heifner
Copy link
Contributor

@heifner heifner commented Jul 9, 2025

When starting from a snapshot, not all stride files are present. Instead of attempting to find the first stride file and failing, loop through the trx id files on disk. Also now searches in reverse order assuming the trx searched for is more likely to be in a recent block.

Resolves #1693

heifner added 2 commits July 9, 2025 09:12
…ove performance for nominal case of trx more likely to be in recent block
@heifner heifner added the OCI Work exclusive to OCI team label Jul 9, 2025
@heifner heifner marked this pull request as ready for review July 9, 2025 15:18
@heifner heifner requested review from greg7mdp and linh2931 July 9, 2025 15:18
@heifner heifner linked an issue Jul 9, 2025 that may be closed by this pull request
@heifner heifner added this to the Spring v1.2.1 milestone Jul 9, 2025
@greg7mdp
Copy link
Contributor

greg7mdp commented Jul 9, 2025

Is that new solution slower than using the stride files when present? Should we try the stride files first, and in case of failure use this new implementation?

@heifner
Copy link
Contributor Author

heifner commented Jul 9, 2025

Is that new solution slower than using the stride files when present? Should we try the stride files first, and in case of failure use this new implementation?

Both approaches use the stride files. The old approach started at stride 0 and worked its way up to the last stride. If the trx is in the last stride it has to search all previous before finding it in the last stride. The new approach assumes the searched for trx is more likely to be in the most recent stride(s); so it searches in reverse from the latest stride back to the oldest.

@heifner heifner merged commit e5a3c81 into release/1.2 Jul 9, 2025
36 checks passed
@heifner heifner deleted the GH-1693-trace-api-find-trx-fix-1.2 branch July 9, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCI Work exclusive to OCI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trace API can't find transactions if started from snapshot

4 participants