Fix compile of compact_file_example
This commit is contained in:
parent
ded26605f4
commit
b623009619
@ -156,14 +156,14 @@ int main() {
|
|||||||
// if background compaction is not working, write will stall
|
// if background compaction is not working, write will stall
|
||||||
// because of options.level0_stop_writes_trigger
|
// because of options.level0_stop_writes_trigger
|
||||||
for (int i = 1000; i < 99999; ++i) {
|
for (int i = 1000; i < 99999; ++i) {
|
||||||
db->Put(WriteOptions(), ToString(i),
|
db->Put(WriteOptions(), std::to_string(i),
|
||||||
std::string(500, 'a' + (i % 26)));
|
std::string(500, 'a' + (i % 26)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the values are still there
|
// verify the values are still there
|
||||||
std::string value;
|
std::string value;
|
||||||
for (int i = 1000; i < 99999; ++i) {
|
for (int i = 1000; i < 99999; ++i) {
|
||||||
db->Get(ReadOptions(), ToString(i),
|
db->Get(ReadOptions(), std::to_string(i),
|
||||||
&value);
|
&value);
|
||||||
assert(value == std::string(500, 'a' + (i % 26)));
|
assert(value == std::string(500, 'a' + (i % 26)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user