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

ldb files #15

Open
pedrinimm opened this issue Aug 29, 2018 · 1 comment
Open

ldb files #15

pedrinimm opened this issue Aug 29, 2018 · 1 comment

Comments

@pedrinimm
Copy link

Currently there is a bug on levelDB, unfortunately the implication is the error is also present in goqueue.

(google/leveldb#593)

This error consist on levelDB not getting rid off old ldb files. Currently I am working on an application that handles a high amount of incoming data that has to be stored while being processed. After a couple days running I end up with high amount of ldb files (> 2000).

Then once I restart my application and the gopqueue wants to do a recovery, it ends up exceeding the allowed number of open files descriptors on my system.

I would like to fix this issue by using the CompactRange function from leveldb while my program is executing. Nevertheless, due to the lack of exposure to the db struct from goqueue and no Compact/Clean function from the queue struct itself, this is not possible.

It would be nice if either the db struct could be exposed or if there was a Clean/Compact call from the queue itself.

@nbmoa
Copy link

nbmoa commented Mar 9, 2021

We encounter the same issue, but calling the CompactRange from the underlying levelDB doesn't fix the issue completely.
We use the DiskQueue as a persistent FIFO for our messages, so when we restart the service and don't loose data.

Before CompactRange call:
Queue is empty, it has the complete size of 830MB and consists of roughly 500 files. Most of the ldb files are between 1.6MB and 2MB.

After CompactRange call:
Queue is still empty :), it has a complete size of 700MB and consists of roughly 400 files. Now only ldb files with the size between 1.6MB and 2MB are left, all files that had a smaller size vanished.

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