Skip to content

Conversation

@danieldoglas
Copy link
Contributor

Summary

  • When a command runs multiple transactions (e.g., peek then process), _totalTransactionElapsed was only storing the last transaction's time, meaning the slowest transaction could be silently lost in timing logs.
  • Changed rollback and commit to use max() so the highest transaction time is preserved across all transactions within a single command.
  • Added resetMaxTransactionElapsed() called at command boundaries (start of peekCommand) so the max doesn't carry over between commands on the same shared db handle.

Test plan

  • Verify timing logs correctly report the longest transaction time when a command runs multiple transactions
  • Verify timing resets between different commands on the same db handle
  • Run existing Bedrock tests to confirm no regressions

🤖 Generated with Claude Code

Gonals and others added 30 commits July 30, 2024 17:49
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
pecanoro and others added 28 commits December 16, 2025 12:19
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
Update expensify_prod branch
When a command runs multiple transactions (e.g., peek then process),
_totalTransactionElapsed was only storing the last transaction's time.
This meant slow transactions in earlier phases were silently lost in
timing logs.

Use max() in both rollback and commit so the highest transaction time
is preserved. Reset the counter at command boundaries (start of
peekCommand) so it doesn't carry over between commands on the same
shared db handle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.