Skip to content

Allocate scratch space when loading databases - #268

Open
sricharanreddycheruku wants to merge 1 commit into
darvid:mainfrom
sricharanreddycheruku:fix-loadb-scratch-allocation
Open

sricharanreddycheruku wants to merge 1 commit into
darvid:mainfrom
sricharanreddycheruku:fix-loadb-scratch-allocation

Conversation

@sricharanreddycheruku

Copy link
Copy Markdown

Reloaded databases have no scratch space, so scanning raises InvalidError.
Allocate Scratch after deserialization, with alloc_scratch=False for callers
managing scratch manually, as suggested in the issue. Clean failed loads,
update types/docs and remove the workaround from scan tests.

Fixes #153.

Three existing scan cases fail before the fix; six allocation-option cases
reject the new argument. Three invalid-input controls pass. All twelve pass
afterward. Source-built Python 3.12: 41 pass/two slow skips. Debug suites on
3.10/3.12/3.14: 40 pass/three skips each, including the existing UTF-8 compiler
limitation. Combined with #265/#266: 96 pass/two skips under PYTHONMALLOC=debug.
clang-format 9, source Black/Ruff, changed-test formatting and strict docs pass.
Whole-test Ruff retains an unrelated unused test_text variable. Python 3.9
has an unchanged Py_NewRef build failure and was not validated. Independent
branch from main.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dumpb/loadb results in non-working database

1 participant