Revision 7c1c8ce5acc882fa0496b71b9a9813d1dff47e0f authored by Andrew Kryczka on 05 May 2017, 00:40:29 UTC, committed by Facebook Github Bot on 05 May 2017, 00:43:22 UTC
Summary:
When user doesn't set a limit on compaction output file size, let's use the sum of the input files' sizes. This will avoid passing UINT64_MAX as fallocate()'s length. Reported in #2249.

Test setup:
- command: `TEST_TMPDIR=/data/rocksdb-test/ strace -e fallocate ./db_compaction_test --gtest_filter=DBCompactionTest.ManualCompactionUnknownOutputSize`
- filesystem: xfs

before this diff:
`fallocate(10, 01, 0, 1844674407370955160) = -1 ENOSPC (No space left on device)`

after this diff:
`fallocate(10, 01, 0, 1977)              = 0`
Closes https://github.com/facebook/rocksdb/pull/2252

Differential Revision: D5007275

Pulled By: ajkr

fbshipit-source-id: 4491404a6ae8a41328aede2e2d6f4d9ac3e38880
1 parent a45e98a
History
File Mode Size
dump
rdb
CMakeLists.txt -rw-r--r-- 544 bytes
Dockerfile -rw-r--r-- 81 bytes
auto_sanity_test.sh -rwxr-xr-x 2.7 KB
benchmark.sh -rwxr-xr-x 16.5 KB
benchmark_leveldb.sh -rwxr-xr-x 5.1 KB
check_format_compatible.sh -rwxr-xr-x 3.9 KB
db_bench.cc -rw-r--r-- 986 bytes
db_bench_tool.cc -rw-r--r-- 180.9 KB
db_bench_tool_test.cc -rw-r--r-- 9.8 KB
db_crashtest.py -rw-r--r-- 13.2 KB
db_repl_stress.cc -rw-r--r-- 4.6 KB
db_sanity_test.cc -rw-r--r-- 8.6 KB
db_stress.cc -rw-r--r-- 84.3 KB
dbench_monitor -rwxr-xr-x 2.6 KB
generate_random_db.sh -rwxr-xr-x 726 bytes
ldb.cc -rw-r--r-- 737 bytes
ldb_cmd.cc -rw-r--r-- 94.6 KB
ldb_cmd_impl.h -rw-r--r-- 14.1 KB
ldb_cmd_test.cc -rw-r--r-- 2.0 KB
ldb_test.py -rw-r--r-- 23.7 KB
ldb_tool.cc -rw-r--r-- 4.7 KB
pflag -rwxr-xr-x 4.0 KB
reduce_levels_test.cc -rw-r--r-- 5.4 KB
regression_test.sh -rwxr-xr-x 15.0 KB
rocksdb_dump_test.sh -rwxr-xr-x 336 bytes
run_flash_bench.sh -rwxr-xr-x 13.4 KB
run_leveldb.sh -rwxr-xr-x 6.2 KB
sample-dump.dmp -rw-r--r-- 100 bytes
sst_dump.cc -rw-r--r-- 746 bytes
sst_dump_test.cc -rw-r--r-- 6.5 KB
sst_dump_tool.cc -rw-r--r-- 22.2 KB
sst_dump_tool_imp.h -rw-r--r-- 2.7 KB
verify_random_db.sh -rwxr-xr-x 877 bytes
write_stress.cc -rw-r--r-- 10.8 KB
write_stress_runner.py -rw-r--r-- 2.2 KB

back to top