mcollina / mqtt-level-store

Store your in-flight MQTT message on Level, for Node
MIT License
24 stars 11 forks source link

ldb files are not cleaned event after successful publishes #15

Open dushyantbangal opened 5 years ago

dushyantbangal commented 5 years ago

I kept my device offline for 2 days and let it gather data in the store (140 KB every minute)

After I put it online, it uploaded a lot of data and then stopped. Now it was only uploading the new incoming data, so I guess it uploaded everything.

However, before putting the device online, I saw there were files of about 230 MB. After all of the uploading completed, the files were still there. After few more fresh data uploads, some of the files were removed, however, there are still files of about 190 MB.

Is there a setting I am missing? How does this cleanup happen?

mcollina commented 5 years ago

This will need to be investigated. I think it's ok, and over time it stabilizes. You can read more about leveldb physical data layer in https://www.igvita.com/2012/02/06/sstable-and-log-structured-storage-leveldb/.