B-Tree in-place node writes #227
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
experiment
suggestion
support
Testing
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/framework#227
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Statement
When using B-Tree as cache files, the file cache supports keepalive, which means whenever a value is read from the cache, the cache timeout value is updated. This causes a write-append to the B-Tree file with the new node. Consequently, even with only read operations, the file size continues to grow. Although the increase is just the size of the node that stores
__cache_timeout
, if this node contains large data, multiple unnecessary copies are stored on every write.Who will benefit?
This feature will benefit developers and users who rely on B-Tree as cache files by preventing unnecessary file size increases and improving overall performance and efficiency.
Benefits and risks
Benefits
Risks
Proposed solution
Implement in-place writes for the B-Tree cache files. If the size of the data being written is the same or smaller than the previous data, the node should be written to the same location in the file. This can be achieved around lines #371 to #375 of Btree.php, which is where the serialized write occurs.
Examples
N/A
Priority/Severity
changed title from H3: B{-t-}ree in-place writes to H3: B{+-T+}ree in-place writes
changed title from {-H3: -}B-Tree in-place writes to B-Tree in-place {+node +}writes
changed the description