Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DONOTMERGE: merge leveldb upstream #26

Closed
wants to merge 187 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
dd59867
block_builder header file dependency fixed
wankai Jan 29, 2015
e5f0a51
reduce lock's range in DeleteObsoleteFiles
ivanabc Jun 20, 2016
2883fcd
set const property
ivanabc Jun 21, 2016
7d06011
broken db: fix assertion in leveldb::InternalKey::Encode, mark base a…
proller Oct 3, 2016
5b81740
fix comment
Mar 10, 2017
471f0b8
fix comment
zhoudayang May 22, 2017
69e2bd2
LevelDB: Add WriteBatch::ApproximateSize().
pwnall May 24, 2017
8415f00
leveldb: Report missing CURRENT manifest file as database corruption.
pwnall Jul 10, 2017
0b402e9
Use __APPLE__ instead of OS_MACOS. The former is compiler-provided.
Jul 24, 2017
02f43c0
Remove dead code.
davidair Aug 3, 2017
2964b80
leveldb: Fix alignment code in SSE4.2-optimized CRC32C.
pwnall Aug 24, 2017
09a3c8e
Switched variable type from int to uint64_t in ConsumeDecimalNumber.
cmumford Jul 20, 2017
141e767
Simplify Table::Open() flow and remove a delete call.
pwnall Sep 1, 2017
ea0a758
Remove confusing and unnecessary if.
pwnall Sep 1, 2017
bcd9a8e
Use portable CRC32C from google/crc32c.
pwnall Sep 26, 2017
7e12c00
Fix issue 474: a race between the f*_unlocked() STDIO calls in
ghemawat Oct 2, 2017
1c75e88
Fix use of uninitialized value in LRUHandle.
cmumford Oct 2, 2017
2372ac5
Fix file writing bug in CL 170738066.
ghemawat Oct 2, 2017
4447f9c
Remove handling for unused LRUHandle representation special case.
pwnall Oct 3, 2017
d9a9e02
leveldb: Add tests for CL 170769101.
pwnall Oct 3, 2017
8ae7998
Fix FD leak in POSIX Env.
pwnall Oct 3, 2017
542590d
leveldb: Include <algorithm> in util/env_test.cc.
pwnall Oct 4, 2017
4a7e7f5
Add LEVELDB_EXPORT macro to export public symbols.
cmumford Oct 4, 2017
25767d0
leveldb: Remove *_unlocked feature detection from POSIX port.
pwnall Oct 5, 2017
ca216e4
leveldb: Rename SNAPPY to HAVE_SNAPPY.
pwnall Oct 5, 2017
5c39524
Replace SSE-optimized CRC32C in POSIX port with external library.
pwnall Oct 10, 2017
23162ca
Fix typo (forgotten reference operator) in test.
pwnall Oct 10, 2017
0509414
leveldb::DestroyDB will now delete empty directories.
cmumford Oct 17, 2017
3da4d8b
Deleted unused assignments in Reader.
cmumford Oct 19, 2017
b5d4a22
Fixed style guide link in CONTRIBUTING.md
cmumford Oct 23, 2017
47cb9e2
Add leveldb_options_set_max_file_size to the C API.
cmumford Oct 25, 2017
41172a2
Enable thread safety annotations in open source version.
pwnall Feb 14, 2018
8c8024e
Switch HAVE_ library detection macros to 0/1.
pwnall Mar 9, 2018
623d014
Expose Env::GetTempDirectory() for use in C test.
pwnall Mar 9, 2018
49f35d3
leveldb: Update Travis CI configuration for open source build.
pwnall Mar 9, 2018
594cc98
Bypass OSMemoryBarrier() warning on Mac.
pwnall Mar 10, 2018
7fd7c00
Remove unused function ExtractValueType.
pwnall Mar 12, 2018
ddab751
Add tests for {Old}InfoLogFileName().
pwnall Mar 12, 2018
aece206
Remove extern from function declarations.
pwnall Mar 12, 2018
8143c12
Fix includes in util/testharness.h.
pwnall Mar 16, 2018
0fa5a4f
Extend thread safety annotations.
pwnall Mar 16, 2018
739c251
Add CMake build support.
pwnall Mar 17, 2018
50fbc87
Replace SIZE_MAX with std::numeric_limits.
pwnall Mar 20, 2018
df9a841
Add export.h to CMakeLists.txt
yunlingz Mar 20, 2018
8e75db8
Remove build configuration for make.
pwnall Mar 20, 2018
74f032f
leveldb: Require C++11.
pwnall Mar 21, 2018
04f3910
Take <atomic> for granted in port/atomic_pointer.h.
pwnall Mar 21, 2018
0db3041
leveldb: Add more thread safety annotations.
pwnall Mar 23, 2018
6fa4566
Rename CMake project / targets from Leveldb to leveldb.
pwnall Mar 23, 2018
260655b
Define LEVELDB_HAS_PORT_CONFIG_H for old compilers.
pwnall Apr 9, 2018
6a3b915
Remove PLATFORM_IS_LITTLE_ENDIAN from port/posix.h.
pwnall Apr 10, 2018
09217fd
Replace NULL with nullptr in C++ files.
pwnall Apr 10, 2018
1cc8b10
Document the building process.
pwnall Apr 11, 2018
1f7dd5d
Add tests for ConsumeDecimalNumber.
pwnall Apr 13, 2018
a0008de
Reimplement ConsumeDecimalNumber.
pwnall Apr 13, 2018
8046a51
Add forgotten <limits> header to util/logging.cc.
pwnall Apr 13, 2018
14cce84
Fix sign mismatch warnings in GCC.
Apr 16, 2018
d177a02
Replace port_posix with port_stdcxx.
pwnall Apr 17, 2018
4de9594
Add move constructor to Status.
pwnall Apr 23, 2018
bc23e00
Update default log file size in doc.
cmumford Apr 27, 2018
e7840de
Fix documentation for log file growth.
cmumford Apr 27, 2018
1868398
Clean up SnapshotImpl.
pwnall Apr 30, 2018
6a6bdaf
Corrected typo in docs: "cache" to "block_cache".
cmumford May 21, 2018
6caf73a
Clean up Iterator.
pwnall Jun 4, 2018
f7b0e1d
Expose WriteBatch::Append().
pwnall Aug 14, 2018
16a2b8b
Expose WriteBatch::Append in the C API.
pwnall Aug 19, 2018
0ef2310
Remove GCC on OSX from the Travis CI matrix.
pwnall Sep 4, 2018
9b44da7
Clarify comments for leveldb::Env file reading methods.
pwnall Sep 4, 2018
03064cb
Simplify Limiter in env_posix.cc.
pwnall Sep 4, 2018
89af27b
Remove ssize_t from code that is not POSIX-specific.
pwnall Sep 4, 2018
7b945f2
Clean up posix_logger.h.
pwnall Sep 4, 2018
bb88f25
Clean up PosixWritableFile in env_posix.cc.
pwnall Sep 5, 2018
05709fb
Remove InitOnce from the port API.
pwnall Sep 10, 2018
73d5834
Rework threading in env_posix.cc.
pwnall Sep 11, 2018
0145a94
Update .gitignore.
pwnall Sep 12, 2018
c43565d
C++11 cleanup for util/mutexlock.h.
pwnall Sep 18, 2018
a7dc502
Rework once initialization in env_posix.cc.
pwnall Sep 24, 2018
1cb3840
Clean up env_posix.cc.
pwnall Oct 29, 2018
58d7054
Update Travis CI configuration.
pwnall Jan 3, 2019
af7abf0
Add back space to POSIX Logger.
cmumford Jan 7, 2019
b70493c
Fix fdatasync() feature detection in opensource build.
pwnall Jan 8, 2019
296de8d
leveldb: Fix PosixWritableFile::Sync() on Apple systems.
pwnall Jan 9, 2019
fe44948
leveldb: Make WriteBatch::ApproximateSize() const.
pwnall Jan 15, 2019
75fceae
Add O_CLOEXEC to open calls.
adam-azarchs Sep 19, 2018
c69d33b
Added native support for Windows.
cmumford Mar 1, 2019
808e59e
Improve CI configuration.
pwnall Mar 5, 2019
ed76289
Align windows_logger with posix_logger.
pwnall Mar 7, 2019
0447082
Add AppVeyor (Windows CI) badge to README.
pwnall Mar 7, 2019
a20508d
Fix typo (#565)
rex4539 Mar 11, 2019
cf1d1ab
leveldb: Remove unused file port/win/stdint.h.
pwnall Mar 11, 2019
dd90626
Make InMemoryEnv more consistent with filesystem based Env's.
cmumford Mar 11, 2019
7d8e41e
leveldb: Replace AtomicPointer with std::atomic.
pwnall Mar 11, 2019
9ce3051
Deleted dangling reference to deleted atomic_pointer.h.
cmumford Mar 11, 2019
201f77d
Inline defaults in options.
pwnall Mar 19, 2019
ce399ac
Always copy bytes to scratch buffer when reading w/MemEnv.
cmumford Mar 20, 2019
ea49b27
Switch corruption_test to use InMemEnv.
cmumford Mar 20, 2019
15e2278
Use override consistently in leveldb::test::ErrorEnv.
pwnall Mar 20, 2019
6571279
fix a typo in the comment of skiplist_test.cc (#664)
usurai Mar 21, 2019
7035af5
Two small fixes for the Windows implementation (#661)
felipecrv Mar 21, 2019
cf1b5f4
Remove unnecessary bit operation.
Mar 22, 2019
6188a54
leveldb: Add tests for empty keys and values.
pwnall Mar 21, 2019
bd24b96
leveldb: Silence unused argument warnings in MSVC.
pwnall Mar 26, 2019
da94ac6
leveldb: Minor cleanup in ports.
pwnall Mar 27, 2019
416344d
leveldb: Register in copybara whitelist.
pwnall Mar 28, 2019
35619d2
Project import generated by Copybara.
a-googler Mar 29, 2019
56178dd
Update the version to 1.21 in preparation for a new release.
cmumford Mar 29, 2019
952be04
Fix mkdir (windows)
pavel-pimenov Mar 31, 2019
37300aa
Restore soname versioning with CMake build
a-googler Apr 1, 2019
20fb601
Fix snapshot compaction bug
richcole-at-amazon Jan 25, 2016
09fa886
Align version/soversion CMake setup closer with other repositories.
pwnall Apr 2, 2019
71ed7c4
Fixed typo in comment in version_set.h.
cmumford Apr 11, 2019
7711e76
Merge pull request #339 from richcole-at-amazon:master
cmumford Apr 12, 2019
65e86f7
Fix formatting of recent snapshot compaction fix.
cmumford Apr 12, 2019
08e7719
Simplify issue320_test.
cmumford Apr 12, 2019
5a2a472
Fixed missing std namespaces and make_unique.
cmumford Apr 12, 2019
df4a323
Merge pull request #472 from zhoudayang:patch-1
cmumford Apr 12, 2019
7da571c
Merge pull request #669 from pavel-pimenov:fix-readme-windows-mkdir
cmumford Apr 12, 2019
ffabb1a
Merge pull request #665 from cheng-chang:coding
cmumford Apr 12, 2019
2f008ac
Initialize class members to default values in constructors.
cmumford Apr 13, 2019
7b11745
Changed Windows specific highlighting from bash to cmd.
cmumford Apr 13, 2019
2ccb45c
Check for possibly invalid offset in test.
cmumford Apr 15, 2019
3dc9202
[leveldb] Specifically export the WriteBatch::Handler inner class for…
a-googler Apr 23, 2019
d3d1c8a
don't check current key in DBIter::Next()
kylezh Apr 25, 2019
3724030
Update Travis CI configuration.
pwnall Apr 29, 2019
297e66a
Format all files IAW the Google C++ Style Guide.
cmumford May 2, 2019
c784d63
Moved port/README to port/README.md.
cmumford May 2, 2019
9bd23c7
Correct class/structure declaration order.
cmumford May 3, 2019
78b39d6
Bump the version number from 1.21 to 1.22.
cmumford May 3, 2019
abf441b
Merge pull request #278 from wankai:master
pwnall May 4, 2019
9a56c49
Merge pull request #679 from smartxworks:optimize-readseq
pwnall May 4, 2019
24424a1
Style cleanup.
pwnall May 5, 2019
506b172
Convert missed virtual -> override in db_test.cc.
pwnall May 5, 2019
4bd052d
Consolidate benchmark code to benchmarks/.
pwnall May 5, 2019
cd1ec03
Add argument definition for void c functions.
allangj Apr 8, 2016
e22b1ce
Merge pull request #365 from allangj:c-strict-prototypes
pwnall May 6, 2019
142035e
Initialize Stats::start_ before first use in Stats::Start().
cmumford May 6, 2019
a7528a5
Clean up util/coding.{h,cc}.
pwnall May 6, 2019
900f7d3
Merge pull request #624 from adam-azarchs:master
cmumford May 6, 2019
9521545
Formatting changes for prior O_CLOEXEC fix.
cmumford May 6, 2019
27dc99f
Fix EnvPosix tests on Travis CI.
pwnall May 7, 2019
1d94fe2
Merge branch 'master' into patch-2
May 8, 2019
3e6c000
Merge pull request #457 from jellor:patch-2
cmumford May 9, 2019
b7b86ba
Using std::ostringstream in key DebugString.
cmumford May 9, 2019
1aae5c9
Merge pull request #411 from proller:assert1
cmumford May 9, 2019
85cd40d
Added unit test for InternalKey::DecodeFrom with empty string.
cmumford May 9, 2019
28e6d23
Switch to using C++ 11 override specifier.
cmumford May 9, 2019
1d0b101
Converted two for-loops to while-loops.
cmumford May 13, 2019
c00e177
Guard DBImpl::versions_ by mutex_.
cmumford May 15, 2019
63d5315
Merge branch 'master' into master
ivanabc May 23, 2019
ae49533
Add explicit typecasts to avoid compiler warning.
cmumford May 22, 2019
a3b71c1
Use GCC 9 on Travis CI
pwnall May 24, 2019
863f185
unsigned char -> uint8_t
pwnall May 28, 2019
72a38ff
Replace "> >" with ">>"
pwnall May 28, 2019
4cb80b7
Merge pull request #386 from ivanabc:master
cmumford May 30, 2019
6a90bb9
use ForEachOverlapping to impl Get
neal-zhu Jun 11, 2019
8fa7a93
fix bug
neal-zhu Jun 11, 2019
177cd08
format
neal-zhu Jun 11, 2019
f668239
remove TODO in Version::ForEachOverlapping
neal-zhu Jun 11, 2019
76ca116
fix bug(uninitialized options pointer in State)
neal-zhu Jun 11, 2019
107a75b
cache Saver in State object
neal-zhu Jun 11, 2019
69061b4
Disable exceptions and RTTI in CMake configuration.
pwnall Jun 12, 2019
e0d5f83
Align EnvPosix and EnvWindows.
pwnall Jun 12, 2019
9ee91ac
Ending sentences with periods in README.md.
cmumford Jun 12, 2019
046216a
Add "leveldb" subdirectory to public include paths.
cmumford Jun 12, 2019
53e280b
Simplify unlocking in DeleteObsoleteFiles.
cmumford Jun 13, 2019
5e92189
drop fileds in State that are duplicates of fileds in Saver and fix typo
neal-zhu Aug 28, 2019
21304d4
Merge pull request #698 from neal-zhu:master
pwnall Aug 28, 2019
60db170
Fix tsan problem in env_test.
ghemawat Sep 10, 2019
45ee615
Update Travis CI configuration.
pwnall Sep 30, 2019
370d532
Using CMake's check_cxx_compiler_flag to check support for -Wthread-s…
cmumford Oct 1, 2019
657ba51
Added return in Version::Get::State::Match to quiet warning.
cmumford Oct 2, 2019
95d0ba1
Renamed local variable in DBImpl::Write.
cmumford Oct 28, 2019
cf4d9ab
Test CMake installation on Travis.
pwnall Nov 4, 2019
5abdf4c
Fix installed target definition.
pwnall Nov 4, 2019
0c40829
Remove redundant PROJECT_SOURCE_DIR usage from CMake config.
pwnall Nov 5, 2019
017fefb
Merge branch 'master' into bitcoin-fork
laanwj Nov 6, 2019
3c23e87
Revert "crc32: move helper functions out of port_posix_sse.cc"
laanwj Nov 6, 2019
61033ae
Remove our "win" port and env, no longer necessary
laanwj Nov 6, 2019
a2863f6
Remove our atomic pointer
laanwj Nov 6, 2019
57ce63b
Remove build_detect_platform
laanwj Nov 6, 2019
78e910c
Remove port_posix.cc
laanwj Nov 6, 2019
43765bd
remove LEVELDB_PLATFORM_WINDOWS ifdef in posix env
laanwj Nov 6, 2019
961c9f0
revert a silly posix->Posix change
laanwj Nov 6, 2019
35fafcd
revert GetName patch
laanwj Nov 6, 2019
938e3bf
re-apply: Add filename to corruption errors
laanwj Nov 6, 2019
2e64422
re-apply: Do not crash if filesystem can't fsync
laanwj Nov 6, 2019
6c1e784
re-apply: Increase maximum read-only mmap()s used from 1000 to 4096 o…
laanwj Nov 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Build matrix / environment variables are explained on:
# https://www.appveyor.com/docs/appveyor-yml/
# This file can be validated on: https://ci.appveyor.com/tools/validate-yaml

version: "{build}"

environment:
matrix:
# AppVeyor currently has no custom job name feature.
# http://help.appveyor.com/discussions/questions/1623-can-i-provide-a-friendly-name-for-jobs
- JOB: Visual Studio 2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_GENERATOR: Visual Studio 15 2017

platform:
- x86
- x64

configuration:
- RelWithDebInfo
- Debug

build_script:
- git submodule update --init --recursive
- mkdir build
- cd build
- if "%platform%"=="x64" set CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64
- cmake --version
- cmake .. -G "%CMAKE_GENERATOR%"
-DCMAKE_CONFIGURATION_TYPES="%CONFIGURATION%"
- cmake --build . --config "%CONFIGURATION%"
- cd ..

test_script:
- cd build && ctest --verbose --build-config "%CONFIGURATION%" && cd ..
18 changes: 18 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Run manually to reformat a file:
# clang-format -i --style=file <file>
# find . -iname '*.cc' -o -iname '*.h' -o -iname '*.h.in' | xargs clang-format -i --style=file
BasedOnStyle: Google
DerivePointerAlignment: false

# Public headers are in a different location in the internal Google repository.
# Order them so that when imported to the authoritative repository they will be
# in correct alphabetical order.
IncludeCategories:
- Regex: '^(<|"(benchmarks|db|helpers)/)'
Priority: 1
- Regex: '^"(leveldb)/'
Priority: 2
- Regex: '^(<|"(issues|port|table|third_party|util)/)'
Priority: 3
- Regex: '.*'
Priority: 4
21 changes: 8 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
build_config.mk
*.a
*.o
*.dylib*
*.so
*.so.*
*_test
db_bench
leveldbutil
Release
Debug
Benchmark
vs2010.*
# Editors.
*.sw*
.vscode
.DS_Store

# Build directory.
build/
out/
81 changes: 75 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,82 @@
# Build matrix / environment variables are explained on:
# http://about.travis-ci.org/docs/user/build-configuration/
# This file can be validated on: http://lint.travis-ci.org/

language: cpp
dist: bionic
osx_image: xcode10.3

compiler:
- clang
- gcc
- clang
os:
- linux
- osx
sudo: false
before_install:
- echo $LANG
- echo $LC_ALL

env:
- BUILD_TYPE=Debug
- BUILD_TYPE=RelWithDebInfo

addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- clang-9
- cmake
- gcc-9
- g++-9
- libgoogle-perftools-dev
- libkyotocabinet-dev
- libsnappy-dev
- libsqlite3-dev
- ninja-build
homebrew:
packages:
- cmake
- crc32c
- gcc@9
- gperftools
- kyoto-cabinet
- llvm@9
- ninja
- snappy
- sqlite3
update: true

install:
# The following Homebrew packages aren't linked by default, and need to be
# prepended to the path explicitly.
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
export PATH="$(brew --prefix llvm)/bin:$PATH";
fi
# /usr/bin/gcc points to an older compiler on both Linux and macOS.
- if [ "$CXX" = "g++" ]; then export CXX="g++-9" CC="gcc-9"; fi
# /usr/bin/clang points to an older compiler on both Linux and macOS.
#
# Homebrew's llvm package doesn't ship a versioned clang++ binary, so the values
# below don't work on macOS. Fortunately, the path change above makes the
# default values (clang and clang++) resolve to the correct compiler on macOS.
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
if [ "$CXX" = "clang++" ]; then export CXX="clang++-9" CC="clang-9"; fi;
fi
- echo ${CC}
- echo ${CXX}
- ${CXX} --version
- cmake --version

before_script:
- mkdir -p build && cd build
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DCMAKE_INSTALL_PREFIX=$HOME/.local
- cmake --build .
- cd ..

script:
- make -j 4 check
- cd build && ctest --verbose && cd ..
- "if [ -f build/db_bench ] ; then build/db_bench ; fi"
- "if [ -f build/db_bench_sqlite3 ] ; then build/db_bench_sqlite3 ; fi"
- "if [ -f build/db_bench_tree_db ] ; then build/db_bench_tree_db ; fi"
- cd build && cmake --build . --target install
Loading