upsert_transaction_record script insert and record upsert are separate transactions, can orphan script data
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 21
- Merge trung bình
- 12 giờ 14 phút
- Pull request đã merge (30 ngày)
- 41
Mô tả
## Bug
`upsert_transaction_record` in `crates/idxdb-store/src/transaction/utils.rs` first inserts the transaction script via `idxdb_insert_transaction_script`, then upserts the transaction record via `idxdb_upsert_transaction_record`. These are two separate Dexie transactions.
If the second call fails, the script is stored with no corresponding transaction record referencing it. This orphaned script data accumulates in IndexedDB and is never cleaned up.
## Impact
- Orphaned script data in IndexedDB that is never reclaimed
- Low severity (no data corruption), but violates atomicity expectations
## Root cause
No wrapping transaction. Same pattern as the `upsert_account_storage` bug (separate issue).
Hướng dẫn đóng góp
Hướng nghiên cứu
The bug is in crates/idxdb-store/src/transaction/utils.rs in the upsert_transaction_record function. Examine the two separate Dexie transaction calls: idxdb_insert_transaction_script and idxdb_upsert_transaction_record. Understand how IndexedDB transactions work in this SDK. The fix is to wrap both operations in a single transaction. Check for similar patterns like the referenced upsert_account_storage bug to ensure consistency.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust, typescript
- Lĩnh vực
- backend, databases
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 65/100