google / google/leveldb

How can I config the max_file_size and enable it work well?

Open
#438 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
39.4k
Forks
8.2k
PR merge metrics
No merged PRs in 30d

Description

The max_file_size for leveldb seems not works well for me.
My env:
ubuntu 14.04 amd64

I clone the code, and edit the _**max_file_size**_, _**write_buffer_size**_, as follows:
1. init config in [util/options.cc](https://github.com/google/leveldb/blob/master/util/options.cc) :
![image](https://cloud.githubusercontent.com/assets/8437861/21676954/f5642a2a-d372-11e6-83b3-ce0c04ba1d70.png)

2. _**max_file_size**_ limit in [db/db_impl.cc](https://github.com/google/leveldb/blob/master/db/db_impl.cc) :
![image](https://cloud.githubusercontent.com/assets/8437861/21677028/3c2a89ae-d373-11e6-8a69-0da27bcbaa12.png)

And then, I run
`sudo cp -r include/leveldb /usr/local/include/`
`sudo cp -r out-shared/libleveldb.so* /usr/local/lib/`
`sudo ldconfig`
I use python wrapper for leveldb, without the _**max_file_size**_ config, it works well.
But the output *.ldb is not well as config specify, as follows:
![image](https://cloud.githubusercontent.com/assets/8437861/21677142/b97f0236-d373-11e6-84fa-5403f6ae9ff9.png)
I find that each four bigger ***.ldb** will be split more small ***.ldb** files, I think it should be became much larger than the current bigger ***.ldb** files or equal or increase the count of the bigger ***.ldb** files.
I have try my best to solve it, but find it`s not work as expect.
Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.