From ff6e957aa135b51829c102aa8932049efd043499 Mon Sep 17 00:00:00 2001 From: cld378632668 <378632668@qq.com> Date: Wed, 13 Dec 2017 17:14:04 +0800 Subject: [PATCH] 111 --- .gitignore | 9 + .idea/.name | 1 + .idea/leveldb-v1.3.iml | 2 + .idea/misc.xml | 4 + .idea/modules.xml | 8 + .idea/vcs.xml | 6 + .idea/workspace.xml | 274 ++ .travis.yml | 13 + .vs/leveldb/v14/.suo | Bin 0 -> 26112 bytes AUTHORS | 12 + CMakeLists.txt | 123 + CONTRIBUTING.md | 36 + LICENSE | 27 + Makefile | 428 ++++ NEWS | 17 + README.md | 8 +- TODO | 14 + build_detect_platform | 243 ++ cmake-build-debug/CMakeCache.txt | 363 +++ .../CMakeFiles/3.8.2/CMakeCCompiler.cmake | 68 + .../CMakeFiles/3.8.2/CMakeCXXCompiler.cmake | 70 + .../3.8.2/CMakeDetermineCompilerABI_C.bin | Bin 0 -> 40736 bytes .../3.8.2/CMakeDetermineCompilerABI_CXX.bin | Bin 0 -> 41765 bytes .../CMakeFiles/3.8.2/CMakeRCCompiler.cmake | 6 + .../CMakeFiles/3.8.2/CMakeSystem.cmake | 15 + .../3.8.2/CompilerIdC/CMakeCCompilerId.c | 567 +++++ .../CompilerIdCXX/CMakeCXXCompilerId.cpp | 539 ++++ .../CMakeFiles/3.8.2/CompilerIdCXX/a.exe | Bin 0 -> 41904 bytes .../CMakeDirectoryInformation.cmake | 16 + cmake-build-debug/CMakeFiles/CMakeOutput.log | 684 +++++ cmake-build-debug/CMakeFiles/Makefile.cmake | 128 + cmake-build-debug/CMakeFiles/Makefile2 | 107 + .../CMakeFiles/TargetDirectories.txt | 3 + .../CMakeFiles/clion-environment.txt | 3 + cmake-build-debug/CMakeFiles/clion-log.txt | 18 + .../CMakeFiles/cmake.check_cache | 1 + .../CMakeFiles/feature_tests.bin | Bin 0 -> 43780 bytes cmake-build-debug/CMakeFiles/feature_tests.c | 34 + .../CMakeFiles/feature_tests.cxx | 405 +++ .../leveldb_v1_3.dir/DependInfo.cmake | 86 + .../CMakeFiles/leveldb_v1_3.dir/build.make | 1680 ++++++++++++ .../leveldb_v1_3.dir/cmake_clean.cmake | 70 + .../CMakeFiles/leveldb_v1_3.dir/depend.make | 2 + .../CMakeFiles/leveldb_v1_3.dir/flags.make | 17 + .../CMakeFiles/leveldb_v1_3.dir/link.txt | 3 + .../CMakeFiles/leveldb_v1_3.dir/linklibs.rsp | 1 + .../CMakeFiles/leveldb_v1_3.dir/objects1.rsp | 1 + .../CMakeFiles/leveldb_v1_3.dir/progress.make | 61 + cmake-build-debug/CMakeFiles/progress.marks | 1 + cmake-build-debug/Makefile | 1917 ++++++++++++++ cmake-build-debug/cmake_install.cmake | 39 + cmake-build-debug/leveldb_v1_3.cbp | 434 ++++ db/autocompact_test.cc | 118 + db/builder.cc | 84 + db/builder.h | 34 + db/c.cc | 599 +++++ db/c_test.c | 391 +++ db/corruption_test.cc | 374 +++ db/db_bench.cc | 1020 ++++++++ db/db_impl.cc | 1568 ++++++++++++ db/db_impl.h | 211 ++ db/db_iter.cc | 317 +++ db/db_iter.h | 28 + db/db_test.cc | 2249 +++++++++++++++++ db/dbformat.cc | 140 + db/dbformat.h | 230 ++ db/dbformat_test.cc | 112 + db/dumpfile.cc | 225 ++ db/fault_injection_test.cc | 554 ++++ db/filename.cc | 144 ++ db/filename.h | 85 + db/filename_test.cc | 123 + db/leveldbutil.cc | 64 + db/log_format.h | 35 + db/log_reader.cc | 279 ++ db/log_reader.h | 113 + db/log_test.cc | 591 +++++ db/log_writer.cc | 112 + db/log_writer.h | 54 + db/memtable.cc | 145 ++ db/memtable.h | 88 + db/recovery_test.cc | 341 +++ db/repair.cc | 461 ++++ db/skiplist.h | 384 +++ db/skiplist_test.cc | 378 +++ db/snapshot.h | 67 + db/table_cache.cc | 127 + db/table_cache.h | 61 + db/util/arena.cc | 68 + db/util/arena.h | 68 + db/util/arena_test.cc | 68 + db/util/bloom.cc | 95 + db/util/bloom_test.cc | 162 ++ db/util/cache.cc | 405 +++ db/util/cache_test.cc | 234 ++ db/util/coding.cc | 194 ++ db/util/coding.h | 104 + db/util/coding_test.cc | 196 ++ db/util/comparator.cc | 81 + db/util/crc32c.cc | 380 +++ db/util/crc32c.h | 45 + db/util/crc32c_test.cc | 72 + db/util/env.cc | 100 + db/util/env_posix.cc | 749 ++++++ db/util/env_posix_test.cc | 66 + db/util/env_posix_test_helper.h | 28 + db/util/env_test.cc | 223 ++ db/util/filter_policy.cc | 11 + db/util/hash.cc | 52 + db/util/hash.h | 19 + db/util/hash_test.cc | 54 + db/util/histogram.cc | 139 + db/util/histogram.h | 42 + db/util/logging.cc | 73 + db/util/logging.h | 43 + db/util/mutexlock.h | 41 + db/util/options.cc | 30 + db/util/posix_logger.h | 98 + db/util/random.h | 64 + db/util/status.cc | 75 + db/util/testharness.cc | 77 + db/util/testharness.h | 138 + db/util/testutil.cc | 51 + db/util/testutil.h | 63 + db/version_edit.cc | 266 ++ db/version_edit.h | 107 + db/version_edit_test.cc | 46 + db/version_set.cc | 1534 +++++++++++ db/version_set.h | 402 +++ db/version_set_test.cc | 179 ++ db/write_batch.cc | 151 ++ db/write_batch_internal.h | 50 + db/write_batch_test.cc | 137 + doc/bench/db_bench_sqlite3.cc | 718 ++++++ doc/bench/db_bench_tree_db.cc | 528 ++++ doc/benchmark.html | 459 ++++ doc/impl.md | 170 ++ doc/index.md | 523 ++++ doc/log_format.md | 75 + doc/table_format.md | 107 + helpers/memenv/memenv.cc | 398 +++ helpers/memenv/memenv.h | 20 + helpers/memenv/memenv_test.cc | 241 ++ include/leveldb/c.h | 267 ++ include/leveldb/cache.h | 111 + include/leveldb/comparator.h | 64 + include/leveldb/db.h | 169 ++ include/leveldb/dumpfile.h | 27 + include/leveldb/env.h | 354 +++ include/leveldb/export.h | 33 + include/leveldb/filter_policy.h | 70 + include/leveldb/iterator.h | 101 + include/leveldb/options.h | 214 ++ include/leveldb/slice.h | 110 + include/leveldb/status.h | 113 + include/leveldb/table.h | 86 + include/leveldb/table_builder.h | 93 + include/leveldb/write_batch.h | 71 + issues/issue178_test.cc | 92 + issues/issue200_test.cc | 59 + leveldb.VC.db | Bin 0 -> 33943552 bytes leveldb.sln | 28 + leveldb.vcxproj | 280 ++ leveldb.vcxproj.filters | 537 ++++ port/README | 10 + port/atomic_pointer.h | 242 ++ port/port.h | 19 + port/port_example.h | 141 ++ port/port_posix.cc | 53 + port/port_posix.h | 156 ++ port/thread_annotations.h | 60 + port/win/stdint.h | 24 + table/block.cc | 268 ++ table/block.h | 44 + table/block_builder.cc | 119 + table/block_builder.h | 57 + table/filter_block.cc | 111 + table/filter_block.h | 68 + table/filter_block_test.cc | 128 + table/format.cc | 146 ++ table/format.h | 108 + table/iterator.cc | 67 + table/iterator_wrapper.h | 66 + table/merger.cc | 197 ++ table/merger.h | 26 + table/table.cc | 284 +++ table/table_builder.cc | 270 ++ table/table_test.cc | 876 +++++++ table/two_level_iterator.cc | 182 ++ table/two_level_iterator.h | 34 + util/arena.cc | 68 + util/arena.h | 68 + util/arena_test.cc | 68 + util/bloom.cc | 95 + util/bloom_test.cc | 162 ++ util/cache.cc | 405 +++ util/cache_test.cc | 234 ++ util/coding.cc | 194 ++ util/coding.h | 104 + util/coding_test.cc | 196 ++ util/comparator.cc | 81 + util/crc32c.cc | 380 +++ util/crc32c.h | 45 + util/crc32c_test.cc | 72 + util/env.cc | 100 + util/env_posix.cc | 749 ++++++ util/env_posix_test.cc | 66 + util/env_posix_test_helper.h | 28 + util/env_test.cc | 223 ++ util/filter_policy.cc | 11 + util/hash.cc | 52 + util/hash.h | 19 + util/hash_test.cc | 54 + util/histogram.cc | 139 + util/histogram.h | 42 + util/logging.cc | 73 + util/logging.h | 43 + util/mutexlock.h | 41 + util/options.cc | 30 + util/posix_logger.h | 98 + util/random.h | 64 + util/status.cc | 75 + util/testharness.cc | 77 + util/testharness.h | 138 + util/testutil.cc | 51 + util/testutil.h | 63 + 226 files changed, 42030 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 .idea/.name create mode 100644 .idea/leveldb-v1.3.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 .travis.yml create mode 100644 .vs/leveldb/v14/.suo create mode 100644 AUTHORS create mode 100644 CMakeLists.txt create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 NEWS create mode 100644 TODO create mode 100644 build_detect_platform create mode 100644 cmake-build-debug/CMakeCache.txt create mode 100644 cmake-build-debug/CMakeFiles/3.8.2/CMakeCCompiler.cmake create mode 100644 cmake-build-debug/CMakeFiles/3.8.2/CMakeCXXCompiler.cmake create mode 100644 cmake-build-debug/CMakeFiles/3.8.2/CMakeDetermineCompilerABI_C.bin create mode 100644 cmake-build-debug/CMakeFiles/3.8.2/CMakeDetermineCompilerABI_CXX.bin create mode 100644 cmake-build-debug/CMakeFiles/3.8.2/CMakeRCCompiler.cmake create mode 100644 cmake-build-debug/CMakeFiles/3.8.2/CMakeSystem.cmake create mode 100644 cmake-build-debug/CMakeFiles/3.8.2/CompilerIdC/CMakeCCompilerId.c create mode 100644 cmake-build-debug/CMakeFiles/3.8.2/CompilerIdCXX/CMakeCXXCompilerId.cpp create mode 100644 cmake-build-debug/CMakeFiles/3.8.2/CompilerIdCXX/a.exe create mode 100644 cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake create mode 100644 cmake-build-debug/CMakeFiles/CMakeOutput.log create mode 100644 cmake-build-debug/CMakeFiles/Makefile.cmake create mode 100644 cmake-build-debug/CMakeFiles/Makefile2 create mode 100644 cmake-build-debug/CMakeFiles/TargetDirectories.txt create mode 100644 cmake-build-debug/CMakeFiles/clion-environment.txt create mode 100644 cmake-build-debug/CMakeFiles/clion-log.txt create mode 100644 cmake-build-debug/CMakeFiles/cmake.check_cache create mode 100644 cmake-build-debug/CMakeFiles/feature_tests.bin create mode 100644 cmake-build-debug/CMakeFiles/feature_tests.c create mode 100644 cmake-build-debug/CMakeFiles/feature_tests.cxx create mode 100644 cmake-build-debug/CMakeFiles/leveldb_v1_3.dir/DependInfo.cmake create mode 100644 cmake-build-debug/CMakeFiles/leveldb_v1_3.dir/build.make create mode 100644 cmake-build-debug/CMakeFiles/leveldb_v1_3.dir/cmake_clean.cmake create mode 100644 cmake-build-debug/CMakeFiles/leveldb_v1_3.dir/depend.make create mode 100644 cmake-build-debug/CMakeFiles/leveldb_v1_3.dir/flags.make create mode 100644 cmake-build-debug/CMakeFiles/leveldb_v1_3.dir/link.txt create mode 100644 cmake-build-debug/CMakeFiles/leveldb_v1_3.dir/linklibs.rsp create mode 100644 cmake-build-debug/CMakeFiles/leveldb_v1_3.dir/objects1.rsp create mode 100644 cmake-build-debug/CMakeFiles/leveldb_v1_3.dir/progress.make create mode 100644 cmake-build-debug/CMakeFiles/progress.marks create mode 100644 cmake-build-debug/Makefile create mode 100644 cmake-build-debug/cmake_install.cmake create mode 100644 cmake-build-debug/leveldb_v1_3.cbp create mode 100644 db/autocompact_test.cc create mode 100644 db/builder.cc create mode 100644 db/builder.h create mode 100644 db/c.cc create mode 100644 db/c_test.c create mode 100644 db/corruption_test.cc create mode 100644 db/db_bench.cc create mode 100644 db/db_impl.cc create mode 100644 db/db_impl.h create mode 100644 db/db_iter.cc create mode 100644 db/db_iter.h create mode 100644 db/db_test.cc create mode 100644 db/dbformat.cc create mode 100644 db/dbformat.h create mode 100644 db/dbformat_test.cc create mode 100644 db/dumpfile.cc create mode 100644 db/fault_injection_test.cc create mode 100644 db/filename.cc create mode 100644 db/filename.h create mode 100644 db/filename_test.cc create mode 100644 db/leveldbutil.cc create mode 100644 db/log_format.h create mode 100644 db/log_reader.cc create mode 100644 db/log_reader.h create mode 100644 db/log_test.cc create mode 100644 db/log_writer.cc create mode 100644 db/log_writer.h create mode 100644 db/memtable.cc create mode 100644 db/memtable.h create mode 100644 db/recovery_test.cc create mode 100644 db/repair.cc create mode 100644 db/skiplist.h create mode 100644 db/skiplist_test.cc create mode 100644 db/snapshot.h create mode 100644 db/table_cache.cc create mode 100644 db/table_cache.h create mode 100644 db/util/arena.cc create mode 100644 db/util/arena.h create mode 100644 db/util/arena_test.cc create mode 100644 db/util/bloom.cc create mode 100644 db/util/bloom_test.cc create mode 100644 db/util/cache.cc create mode 100644 db/util/cache_test.cc create mode 100644 db/util/coding.cc create mode 100644 db/util/coding.h create mode 100644 db/util/coding_test.cc create mode 100644 db/util/comparator.cc create mode 100644 db/util/crc32c.cc create mode 100644 db/util/crc32c.h create mode 100644 db/util/crc32c_test.cc create mode 100644 db/util/env.cc create mode 100644 db/util/env_posix.cc create mode 100644 db/util/env_posix_test.cc create mode 100644 db/util/env_posix_test_helper.h create mode 100644 db/util/env_test.cc create mode 100644 db/util/filter_policy.cc create mode 100644 db/util/hash.cc create mode 100644 db/util/hash.h create mode 100644 db/util/hash_test.cc create mode 100644 db/util/histogram.cc create mode 100644 db/util/histogram.h create mode 100644 db/util/logging.cc create mode 100644 db/util/logging.h create mode 100644 db/util/mutexlock.h create mode 100644 db/util/options.cc create mode 100644 db/util/posix_logger.h create mode 100644 db/util/random.h create mode 100644 db/util/status.cc create mode 100644 db/util/testharness.cc create mode 100644 db/util/testharness.h create mode 100644 db/util/testutil.cc create mode 100644 db/util/testutil.h create mode 100644 db/version_edit.cc create mode 100644 db/version_edit.h create mode 100644 db/version_edit_test.cc create mode 100644 db/version_set.cc create mode 100644 db/version_set.h create mode 100644 db/version_set_test.cc create mode 100644 db/write_batch.cc create mode 100644 db/write_batch_internal.h create mode 100644 db/write_batch_test.cc create mode 100644 doc/bench/db_bench_sqlite3.cc create mode 100644 doc/bench/db_bench_tree_db.cc create mode 100644 doc/benchmark.html create mode 100644 doc/impl.md create mode 100644 doc/index.md create mode 100644 doc/log_format.md create mode 100644 doc/table_format.md create mode 100644 helpers/memenv/memenv.cc create mode 100644 helpers/memenv/memenv.h create mode 100644 helpers/memenv/memenv_test.cc create mode 100644 include/leveldb/c.h create mode 100644 include/leveldb/cache.h create mode 100644 include/leveldb/comparator.h create mode 100644 include/leveldb/db.h create mode 100644 include/leveldb/dumpfile.h create mode 100644 include/leveldb/env.h create mode 100644 include/leveldb/export.h create mode 100644 include/leveldb/filter_policy.h create mode 100644 include/leveldb/iterator.h create mode 100644 include/leveldb/options.h create mode 100644 include/leveldb/slice.h create mode 100644 include/leveldb/status.h create mode 100644 include/leveldb/table.h create mode 100644 include/leveldb/table_builder.h create mode 100644 include/leveldb/write_batch.h create mode 100644 issues/issue178_test.cc create mode 100644 issues/issue200_test.cc create mode 100644 leveldb.VC.db create mode 100644 leveldb.sln create mode 100644 leveldb.vcxproj create mode 100644 leveldb.vcxproj.filters create mode 100644 port/README create mode 100644 port/atomic_pointer.h create mode 100644 port/port.h create mode 100644 port/port_example.h create mode 100644 port/port_posix.cc create mode 100644 port/port_posix.h create mode 100644 port/thread_annotations.h create mode 100644 port/win/stdint.h create mode 100644 table/block.cc create mode 100644 table/block.h create mode 100644 table/block_builder.cc create mode 100644 table/block_builder.h create mode 100644 table/filter_block.cc create mode 100644 table/filter_block.h create mode 100644 table/filter_block_test.cc create mode 100644 table/format.cc create mode 100644 table/format.h create mode 100644 table/iterator.cc create mode 100644 table/iterator_wrapper.h create mode 100644 table/merger.cc create mode 100644 table/merger.h create mode 100644 table/table.cc create mode 100644 table/table_builder.cc create mode 100644 table/table_test.cc create mode 100644 table/two_level_iterator.cc create mode 100644 table/two_level_iterator.h create mode 100644 util/arena.cc create mode 100644 util/arena.h create mode 100644 util/arena_test.cc create mode 100644 util/bloom.cc create mode 100644 util/bloom_test.cc create mode 100644 util/cache.cc create mode 100644 util/cache_test.cc create mode 100644 util/coding.cc create mode 100644 util/coding.h create mode 100644 util/coding_test.cc create mode 100644 util/comparator.cc create mode 100644 util/crc32c.cc create mode 100644 util/crc32c.h create mode 100644 util/crc32c_test.cc create mode 100644 util/env.cc create mode 100644 util/env_posix.cc create mode 100644 util/env_posix_test.cc create mode 100644 util/env_posix_test_helper.h create mode 100644 util/env_test.cc create mode 100644 util/filter_policy.cc create mode 100644 util/hash.cc create mode 100644 util/hash.h create mode 100644 util/hash_test.cc create mode 100644 util/histogram.cc create mode 100644 util/histogram.h create mode 100644 util/logging.cc create mode 100644 util/logging.h create mode 100644 util/mutexlock.h create mode 100644 util/options.cc create mode 100644 util/posix_logger.h create mode 100644 util/random.h create mode 100644 util/status.cc create mode 100644 util/testharness.cc create mode 100644 util/testharness.h create mode 100644 util/testutil.cc create mode 100644 util/testutil.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0630251 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +build_config.mk +*.a +*.o +*.dylib* +*.so +*.so.* +*_test +db_bench +leveldbutil diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..9ad31a5 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +leveldb_v1_3 \ No newline at end of file diff --git a/.idea/leveldb-v1.3.iml b/.idea/leveldb-v1.3.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/.idea/leveldb-v1.3.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..79b3c94 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a3c5dbc --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..7edf985 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,274 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +