storj-archived/core

Used Space KFS bucket incorrect

Closed this issue · 1 comments

Package Versions

Replace the values below using the output from npm list storj. Use npm list -g storj if installed globally.

storjshare-daemon@3.5.1 /usr/local/lib/node_modules/storjshare-daemon
└─┬ storj-lib@6.7.0

Replace the values below using the output from node --version.

v6.11.1

Expected Behavior

Please describe the program's expected behavior. Include an example of your
usage code in the back ticks below if applicable.

I have 8MB used space total. I would expect a bucket size of ~30KB

Actual Behavior

Please describe the program's actual behavior. Please include any stack traces
or log output in the back ticks below.

All buckets have 8MB used space?

{"level":"debug","message":"max KFS bucket size 34359738368, used 8608703, free 34351129665, shard size 40476","timestamp":"2017-07-22T22:01:00.416Z"}
{"level":"debug","message":"max KFS bucket size 34359738368, used 8608703, free 34351129665, shard size 1048576","timestamp":"2017-07-22T22:05:06.252Z"}
{"level":"debug","message":"max KFS bucket size 34359738368, used 8608703, free 34351129665, shard size 2097152","timestamp":"2017-07-22T22:05:31.494Z"}
{"level":"debug","message":"max KFS bucket size 34359738368, used 8608703, free 34351129665, shard size 82131","timestamp":"2017-07-22T22:06:03.118Z"}
{"level":"debug","message":"max KFS bucket size 34359738368, used 8608703, free 34351129665, shard size 82131","timestamp":"2017-07-22T22:09:21.561Z"}
{"level":"debug","message":"max KFS bucket size 34359738368, used 8608703, free 34351129665, shard size 1692026","timestamp":"2017-07-22T22:14:44.906Z"}
{"level":"debug","message":"max KFS bucket size 34359738368, used 8608703, free 34351129665, shard size 134217728","timestamp":"2017-07-22T22:15:49.192Z"}

Looks like the contract db itself is bigger than expected. Some renter are uploading tiny shards. The Problem is now that core will return bucket size + contract db as used space.

I will run more tests to verify that theory and work on a fix.