[PR #270] [MERGED] Fix: handle failing announced cache lookups #200

Closed
opened 2026-05-23 08:33:11 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/appy-one/acebase/pull/270
Author: @appy-one
Created: 4/14/2026
Status: Merged
Merged: 4/14/2026
Merged by: @appy-one

Base: masterHead: fix/handle-failing-announced-cache-lookups


📝 Commits (2)

  • 6f8753a Fix failing node address lookups never resolving a parent read/write operation
  • deb4c02 Add node info to readHeader error message

📊 Changes

2 files changed (+20 additions, -13 deletions)

View changed files

📝 src/node-cache.ts (+18 -12)
📝 src/storage/binary/index.ts (+2 -1)

📄 Description

If a database record is being read from the wrong record address (or has otherwise been corrupted), trying to read the record header fails. Because found node record addresses are cached, a reader will always first request a node's record address from cache. A first cache miss "announces" it so others can simply await the pending lookup instead of doing multiple lookups. In case of a broken record, the lookup fails and the announcement would never be rejected (or resolved). This in turn caused granted read/write locks to become stale, printing warnings about them taking too long, only releasing the locks once they timed out (120 seconds by default), causing other reads and writes being forced to wait. This is now solved by rejecting the announcement upon record read failure.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/appy-one/acebase/pull/270 **Author:** [@appy-one](https://github.com/appy-one) **Created:** 4/14/2026 **Status:** ✅ Merged **Merged:** 4/14/2026 **Merged by:** [@appy-one](https://github.com/appy-one) **Base:** `master` ← **Head:** `fix/handle-failing-announced-cache-lookups` --- ### 📝 Commits (2) - [`6f8753a`](https://github.com/appy-one/acebase/commit/6f8753a2884de811f3a8993073f953eb5805d20c) Fix failing node address lookups never resolving a parent read/write operation - [`deb4c02`](https://github.com/appy-one/acebase/commit/deb4c02d5b0ff2ac01d24f98703246c6999eccb7) Add node info to `readHeader` error message ### 📊 Changes **2 files changed** (+20 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/node-cache.ts` (+18 -12) 📝 `src/storage/binary/index.ts` (+2 -1) </details> ### 📄 Description If a database record is being read from the wrong record address (or has otherwise been corrupted), trying to read the record header fails. Because found node record addresses are cached, a reader will always first request a node's record address from cache. A first cache miss "announces" it so others can simply await the pending lookup instead of doing multiple lookups. In case of a broken record, the lookup fails and the announcement would never be rejected (or resolved). This in turn caused granted read/write locks to become stale, printing warnings about them taking too long, only releasing the locks once they timed out (120 seconds by default), causing other reads and writes being forced to wait. This is now solved by rejecting the announcement upon record read failure. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-23 08:33:11 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#200
No description provided.