-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete reuse space #1539
Open
lvca
wants to merge
79
commits into
main
Choose a base branch
from
delete-reuse-space
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Delete reuse space #1539
Conversation
This file contains 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
The compression must work with previously deleted records with v < 23.12.1
The issue was invalid pointers while deleting multi chunk records. Some pages was defrag while the old pointers pointed to the old place
…record shrunk Issue #1391
The issue was with the missing deletion of the whole linked list segments. Only the head was deleted. This issue was found thanks to the CHECK DATABASE command.
All tests pass locally. @robfrank when you have time, can you also run it on your Mac? Also, since this is quite impactful, we should try using some large databases to check the back compatibility. At the low level, nothing has changed, just piece of mind before rolling this into v25.2.1. |
This could lead to duplicate entries in the index when the transaction was committed.
This v1 algorithm keeps a list of max 20 pages with statistics of number of records and free space per page. When new space is needed (insert/update), then the list of pages is checked first to recycle space from old pages. The statistics are kept in a json file written at db closing, like the count file. This file is not crucial, can be lost, it's just an approx. cache of free space available.
The algorithm now searches first on the current page for new space
…e way space is reused
… real used records
…n no changes in the database was done
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.
Pending PR to analyze differences after a long time working on this branch.
This PR is for #1391.