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

SSB.removeDB() doesn't work #32

Open
KyleMaas opened this issue Feb 20, 2021 · 1 comment
Open

SSB.removeDB() doesn't work #32

KyleMaas opened this issue Feb 20, 2021 · 1 comment

Comments

@KyleMaas
Copy link
Collaborator

Turns out removeDB() doesn't actually remove the database's data. When it goes to delete the file here:

file.destroy()

The file object has the following properties (notice the deletable attribute):

closed: false
deletable: false
destroyed: false
filename: "/.ssb-lite/log.bipf"
opened: false
preferReadonly: false
readable: true
statable: true
writable: true
_close: ƒ close(req)
_destroy: ƒ destroy(req)
_events: {}
_eventsCount: 0
_maxListeners: undefined
_needsOpen: true
_open: ƒ open(req)
_pending: 0
_queued: []
_read: ƒ read(req)
_stat: ƒ stat(req)
_write: ƒ write(req)

I'm wondering if maybe we need to truncate the file instead. Thoughts?

@KyleMaas
Copy link
Collaborator Author

Pretty sure truncating the file wouldn't work. There's too much state held by async-append-only-log. This probably needs #198 to be done before we can actually make this work.

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

1 participant