Repository navigation
Feature/buffer manager - #2
Merged
Merged
Conversation
abort on duplicate page mapping, not just assert guards hand out the page body, not the header
UnpinPage published SetEvictable(true) after releasing the frame's metadata mutex, so DeletePage could vacate the frame in that gap and revoke a membership that did not exist yet, leaving one frame on the free list and in the replacer's candidate set at once. Now published under the mutex. DeletePage erased the mapping, dropped both locks, then deallocated. A fetcher missing in that window read a still-ALLOCATED header, passed validation, and republished a mapping for a page about to join the disk freelist; the recycled id later served the dead page's bytes as a cache hit. Now the shard lock is held across DeallocatePage. Both are named exceptions to DD-002's lock-ordering rules, documented there along with the interleavings and the rejected alternatives. Tests: ConcurrentDeleteAndFetchStayConsistent rebuilt on a reusable barrier whose completion function seeds each round and runs that round's quiescence checks, 500 rounds -- 8/20 failures before, 0/20 after, and no stale observations over 10,000 rounds. The one-page fetch test now accepts kBufferPoolFull as a legal refusal; that flake predates this branch.
Co-authored-by: theweird-kid <62593159+theweird-kid@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes several updates to the build system, documentation, and project configuration to reflect progress on the buffer pool manager and improve development workflow. The most important changes are summarized below.
Build system improvements:
CMakeLists.txtto addsrc/buffer/buffer_pool_manager.cppandsrc/buffer/page_guard.cppto thekernsql_libstatic library, ensuring these new components are included in builds. Also added-Werror=formatto the compiler flags for stricter format checking.CMakeLists.txtto prevent concurrency tests from hanging indefinitely during CI runs.Documentation updates:
README.mdto reflect the move to C++23, expanded the architecture and scope sections with more detail, clarified non-goals, and added direct links to new design docs. The build instructions now specify Clang 17+ with libc++. Example shell usage was added for clarity. [1] [2] [3] [4]Obsidian workspace and appearance configuration:
moonstonetoobsidianin.obsidian/appearance.json..obsidian/graph.jsonfor graph view configuration..obsidian/workspace.jsonto open the buffer pool manager design doc by default, adjusted file explorer settings, and refreshed the list of recently opened files. [1] [2] [3] [4]