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

[BUG] close() -> SIGSEGV #18

Open
raphaelauv opened this issue Jul 7, 2022 · 1 comment
Open

[BUG] close() -> SIGSEGV #18

raphaelauv opened this issue Jul 7, 2022 · 1 comment

Comments

@raphaelauv
Copy link
Contributor

ubuntu 20.04 , python 3.8

import aimrocks

db_options = dict(
    create_if_missing=True,
    paranoid_checks=False,
)

db_path = '/tmp/example_db2'
rocks_db = aimrocks.DB(db_path, aimrocks.Options(**db_options), read_only=False)

batch = aimrocks.WriteBatch()
batch.put(b'key_1', b'value_1')
batch.put(b'key_1', b'value_1')
...

rocks_db.write(batch)
rocks_db.close() # throw the error

rocks_db = aimrocks.DB(db_path, aimrocks.Options(**db_options), read_only=True)
rocks_db.get(b"key_1")
if __name__ == '__main__':
    pass

give

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
@mahnerak
Copy link
Collaborator

mahnerak commented Jul 7, 2022

Previously the right way of closing RocksDB was just deleting the instance (in C++).
If you del rocks_db it will close it.

But we plan to fix this in the future by having explicit close() call to release the resources.

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

No branches or pull requests

2 participants