Repository navigation
feat(storage): add DiskManager for raw page I/O - #336
Conversation
…sue, also fixed formatting and docstring issues
|
I will have to run the pread and pwrite tests. I will test it on my linux to confirm |
sure, would wait for the results |
|
Will check this out soon it's been a busy week. |
|
@mattsva and @VihaanReddyM can you please review this pr? i think this is complete.. |
VihaanReddyM
left a comment
There was a problem hiding this comment.
Sorry for such a late review, I have midterms, family issues and a lot of stuff went on in life. I really apologize 🙏
No worries at all, take your time, and thanks for the review. |
|
@IndicKangaroo srry for not review, I did not had the time. It looks pretty good tho, thanks @VihaanReddyM for merging it 😃 |


Description
Adds DiskManager, the lowest layer of the new storage engine. It does raw
fixed-size page I/O on the .sdb file and nothing else: read a page, write a
page, allocate an empty one. It doesn't know about keys, records or page
contents, and it doesn't call the serializer. Locking stays with the
concurrency manager.
Part of #290. Closes #332 .
Type of Change
Key Changes
write_page, allocate_page, page_count, sync and close ). Page n is at byte offset n * PAGE_SIZE.
are visible.
Reusing freed pages is left to the layer that owns the free list.
repair_torn_page=True it truncates the partial last page instead, and
never touches whole pages.
ordering can be decided later.
read/write otherwise (Windows).
still propagate as OSError.
Validation
The skips are the short read/write and EOF tests, which patch
os.pread/os.pwrite and so only run on platforms that have them.
the failed ones were test_cache.py, which were failing due to implemention of caching before my commits.They are unrelated to this change.
torn-tail repair, short reads and writes, use after close(), and
concurrent allocate_page() calls on one instance.
on the real repo setup, since I ran them on Windows only.
Checklist