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

Deleted entries don't get compacted. #164

Open
cmumford opened this issue Sep 9, 2014 · 0 comments
Open

Deleted entries don't get compacted. #164

cmumford opened this issue Sep 9, 2014 · 0 comments
Labels

Comments

@cmumford
Copy link
Contributor

@cmumford cmumford commented Sep 9, 2014

Original issue 158 created by chirino on 2013-04-18T17:29:05.000Z:

Even if you only ever have 40 megs worth of live entries in a database, you can get into situations where the disk space used continues to grow and grow without bound.

What steps will reproduce the problem?

  1. Run the test in the following patch https://github.com/chirino/leveldb/commit/028fdd112e3a3895f6fcd89a7cd6d252495c4189.patch

What is the expected output? What do you see instead?

The test results in the following:

0% done. Using: 0.00 MB
Deletes starting.  2% done. Using: 35.17 MB
10% done. Using: 143.51 MB
20% done. Using: 147.94 MB
30% done. Using: 147.94 MB
40% done. Using: 147.94 MB
50% done. Using: 149.68 MB
60% done. Using: 298.99 MB
70% done. Using: 414.35 MB
80% done. Using: 542.32 MB
90% done. Using: 651.77 MB
Deleting remaining live records...
Counting records...
Database contained 0 entries.
Using: 741.56 MB
Value 777581808 is not in range [0, 8388608]
db/db_test.cc:1075: Assertion failure Between(Size("", Key(totalKeys)), 0, 1024*1024*8)

What I would expect to happen is that there should be some upper limit to how much space the database uses no mater how many insert/deletes occur if there is a fixed size size of 'live' records. So perhaps output like:

0% done. Using: 0.00 MB
Deletes starting.  2% done. Using: 35.17 MB
10% done. Using: 143.51 MB
20% done. Using: 147.94 MB
30% done. Using: 147.94 MB
40% done. Using: 147.94 MB
50% done. Using: 149.68 MB
60% done. Using: 147.94 MB
70% done. Using: 147.94 MB
80% done. Using: 147.94 MB
90% done. Using: 147.94 MB
Deleting remaining live records...
Counting records...
Database contained 0 entries.
Using: 147.94 MB

What version of the product are you using? On what operating system?

Git master commit 514c943 on OS X

Please provide any additional information below.

This may be related to issue 77 and was discussed on the mailing list at https://groups.google.com/d/msg/leveldb/yL6h1mAOc20/vLU64RylIdMJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant