Skip to content
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
wants to merge 79 commits into
base: main
Choose a base branch
from
Open

Delete reuse space #1539

wants to merge 79 commits into from

Conversation

lvca
Copy link
Contributor

@lvca lvca commented Apr 5, 2024

Pending PR to analyze differences after a long time working on this branch.

This PR is for #1391.

@lvca lvca self-assigned this Apr 5, 2024
@lvca lvca added the enhancement New feature or request label Apr 5, 2024
lvca added 5 commits April 4, 2024 23:02
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.
@lvca
Copy link
Contributor Author

lvca commented Feb 15, 2025

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.

@lvca lvca marked this pull request as ready for review February 15, 2025 06:43
@lvca lvca added this to the 25.2.1 milestone Feb 15, 2025
lvca added 27 commits February 15, 2025 10:46
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant