Commit c73710d
authored
Register cleanup function reliably (#2730)
#### Reference Issues/PRs
<!--Example: Fixes #1234. See also #3456.-->
https://man312219.monday.com/boards/7852509418/pulses/18261646279
#### What does this implement or fix?
There is possibility which arcticdb python objects has been released
only after the library import is cleaned up.
In that case, if any object logs while deconstructing, the null log
instance will make the process seg fault.
Register the cleanup function properly so it will cleanup when the
interpreter de-initialized instead of when the module is unloaded
#### Any other comments?
No test can be given as I can't repeat the issue in a standalone script.
Still pybind11 has warned this may happen:
https://pybind11.readthedocs.io/en/stable/advanced/misc.html#module-destructors
#### Checklist
<details>
<summary>
Checklist for code changes...
</summary>
- [ ] Have you updated the relevant docstrings, documentation and
copyright notice?
- [ ] Is this contribution tested against [all ArcticDB's
features](../docs/mkdocs/docs/technical/contributing.md)?
- [ ] Do all exceptions introduced raise appropriate [error
messages](https://docs.arcticdb.io/error_messages/)?
- [ ] Are API changes highlighted in the PR description?
- [ ] Is the PR labelled as enhancement or bug so it appears in
autogenerated release notes?
</details>
<!--
Thanks for contributing a Pull Request to ArcticDB! Please ensure you
have taken a look at:
- ArcticDB's Code of Conduct:
https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md
- ArcticDB's Contribution Licensing:
https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing
-->1 parent 7c96710 commit c73710d
File tree
2 files changed
+2
-8
lines changed- cpp/arcticdb
- python
- util
2 files changed
+2
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | 385 | | |
| 386 | + | |
394 | 387 | | |
395 | 388 | | |
396 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
0 commit comments