MIRS571 opened a new pull request, #983: URL: https://github.com/apache/burr/pull/983
Follow-up to the non-blocking default-partition suggestion in [#958](https://github.com/apache/burr/pull/958#pullrequestreview-5558490481). The in-memory persisters currently store a checkpoint under the raw `None` key but return `partition_key=""` in its metadata. Reloading with that returned key misses the checkpoint. SQLite already normalizes both inputs to the same default partition. ## Changes - Normalize only `None` to `""` in synchronous and asynchronous in-memory save/load/list operations, including stored checkpoint metadata. - Preserve non-empty keys verbatim and retain non-inserting load behavior. - Add 16 parameterized regression cases for alias lookups, returned-key reloads, mixed-key histories, duplicate sequence IDs, multiple applications, missing reads, and named-partition isolation. Synchronous lookup cases also run against SQLite as a control. - Document the compatibility change. ## Compatibility `None` and `""` are now aliases, not two isolated in-memory partitions. Applications using both for the same `app_id` share a checkpoint history. Existing last-save semantics remain unchanged, including when selecting a specific sequence ID. Callers requiring separate partitions should use distinct non-empty string keys. SQLite behavior is unchanged. ## How I tested this On Python 3.11: - Before the fix, the initial new regression cases produced **10 failures and 6 passes**. - `python -m pytest tests/core/test_persistence.py -q`: **66 passed**. - `python -m pytest tests/core -q -k "not test_visualize_dot_output"`: **446 passed, 4 deselected**. The complete core run was attempted; those four graph-rendering cases cannot run locally because the Graphviz `dot` executable is absent. - Black, isort, flake8, AST, whitespace, EOF and ASF-header pre-commit checks passed on the changed files. The frontend hook was skipped because this change contains no frontend files. - `git diff --check` passed. ## Notes The complete repository test suite, other Python versions and the Sphinx documentation build were not run locally. ## Checklist - [x] Informative title and one focused goal. - [x] Applicable pre-commit checks passed, with the frontend exclusion noted above. - [x] Changed behavior is covered by regression tests. - [x] Compatibility behavior and class documentation are updated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
