Repository navigation
fix(bridge-history-api): return consistent results from cache - #1821
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1821 +/- ##
===========================================
- Coverage 35.59% 35.56% -0.03%
===========================================
Files 263 263
Lines 22733 22751 +18
===========================================
Hits 8091 8091
- Misses 13793 13811 +18
Partials 849 849
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Purpose or design rationale of this PR
POST /api/txsbyhashesreturned different results for the same query. The cache stored each row under the row's own hash, not under the queried hash. Lookups by a counterpart hash (L1 claim tx, L2 relay tx) returned the row once and then an empty result for 60s. Txs with several messages or batch-deposit events lost all but one row after the first call.Changes:
MessageHash, or same tx hash for batch deposits), treat the request as a miss. The DB then returns the row once, in its current state. This covers a message queried by both chain hashes and a failed relay queried with its retry.Compatibility:
[W, C]) always queries the DB. The worst case per request is unchanged: at most 100 hashes and two indexedINqueries.PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
Deployment tag versioning
Has
tagincommon/version.gobeen updated or have you addedbump-versionlabel to this PR?Breaking change label
Does this PR have the
breaking-changelabel?Summary by CodeRabbit