summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Use override consistently in leveldb::test::ErrorEnv.rccostan2019-03-201-4/+4
| | | | | | ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=239453565
* Switch corruption_test to use InMemEnv.cmumford2019-03-204-72/+17
| | | | | | | | | | | | | This change switches corruption_test, which previously used direct file I/O to corrupt table files for open databases, to use InMemEnv. Using an Env eliminates some platform dependencies thus simplifying the tests. Also removed EnvWindowsTestHelper::RelaxFilePermissions(). This was only added because the Windows Env opens files for exclusive access. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=239305329
* Always copy bytes to scratch buffer when reading w/MemEnv.cmumford2019-03-201-7/+0
| | | | | | | | | | | | | | | | FileState::Read (used by InMemoryEnv) creates a new Slice when reading. If all the bytes for the read are in the first block then the Slice points to the private block data in FileState and is not copied to the |scratch| buffer. A recent change allows files in InMemEnv to be overwritten which deletes these blocks and in this case can result in a Slice having a dangling pointer. This change fixes this bug by always copying to the |scratch| buffer. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=239301930
* Inline defaults in options.costan2019-03-203-63/+21
| | | | | | | | | | This CL moves default values for leveldb::{Options,ReadOptions,WriteOptions} from constructors to member declarations, and removes now-redundant comments stating the defaults. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=239271242
* Deleted dangling reference to deleted atomic_pointer.h.cmumford2019-03-111-1/+0
| | | | | | | | | Forgot one reference to atomic_pointer.h in CMakeLists.txt from prior CL. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=237870915
* leveldb: Replace AtomicPointer with std::atomic.costan2019-03-1113-419/+210
| | | | | | | | | | | | This CL removes AtomicPointer from leveldb's port interface. Its usage is replaced with std::atomic<> from the C++11 standard library. AtomicPointer was used to wrap flags, numbers, and pointers, so its instances are replaced with std::atomic<bool>, std::atomic<int>, std::atomic<size_t> and std::atomic<Node*>. This CL does not revise the memory ordering. AtomicPointer's methods are replaced mechanically with their std::atomic equivalents, even when the underlying usage is incorrect. (Example: DBImpl::has_imm_ is written using release stores, even though it is always read using relaxed ordering.) Revising the memory ordering is left for future CLs. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=237865146
* Make InMemoryEnv more consistent with filesystem based Env's.cmumford2019-03-112-16/+53
| | | | | | | | | | | | | | | | | | | | | Env's (like the POSIX Env) which use an actual filesystem behave differently than InMemoryEnv with regards to writing data to a currently open file. InMemoryEnv::NewWritableFile would previously delete that file, if it was open, before creating a new file so any previously open file would be unlinked. This change truncates an open file so that subsequent reads will read that new data. This should have no impact on leveldb as it never has the same file open for both read and write access. This change is only being made for tests (specifically a future change to corruption_test) to allow them to be decoupled from the underlying platform and allow them to use an Env. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=237858231
* leveldb: Remove unused file port/win/stdint.h.costan2019-03-111-24/+0
| | | | | | ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=237832823
* Fix typo (#565)Dimitris Apostolou2019-03-111-1/+1
|
* Add AppVeyor (Windows CI) badge to README.costan2019-03-071-0/+1
| | | | | | ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=237295321
* Align windows_logger with posix_logger.costan2019-03-073-30/+39
| | | | | | | | | | Fixes GitHub issue #657. This CL also makes the Windows CI green. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=237255887
* Improve CI configuration.costan2019-03-042-5/+2
| | | | | | | | | | | | | | | | | | | This CL fixes the following issues: * The Travis CI had the ctest invocation followed by a ";", so non-zero exit codes (indicating test failures) did not cause the build to fail. * The AppVeyor CI had the ctest invocation followed by a ";", causing an error on Windows, where "&" plays the role of ";" [1]. The Windows CI (AppVeyor) will still be red after this CL, as some of the tests are failing. However, this CL is a step forward, as it gets us from failing to start tests to running tests and recording success/error states. [1] https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490954(v=technet.10)#using-multiple-commands-and-conditional-processing-symbols ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=236765633
* Added native support for Windows.cmumford2019-03-0114-23/+1120
| | | | | | | | | | | | | | | | | | | | This change adds a native Windows port (port_windows.h) and a Windows Env (WindowsEnv). Note1: "small" is defined when including <Windows.h> so some parameters were renamed to avoid conflict. Note2: leveldb::Env defines the method: "DeleteFile" which is also a constant defined when including <Windows.h>. The solution was to ensure this macro is defined in env.h which forces the function, when compiled, to be either DeleteFileA or DeleteFileW when building for MBCS or UNICODE respectively. This resolves #519 on GitHub. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=236364778
* leveldb: Make WriteBatch::ApproximateSize() const.costan2019-01-152-2/+2
| | | | | | ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=229395810
* leveldb: Fix PosixWritableFile::Sync() on Apple systems.costan2019-01-093-12/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apple doesn't follow POSIX specifications for fsync(). Instead, fsync() guarantees to flush the buffer cache to the device, which means the data will survive kernel panics, but may not survive power outages. Applications that need stronger guarantees (like databases) need to use fcntl(F_FULLFSYNC). This CL switches PosixWritableFile::Sync() to get the stronger guarantees on Apple systems. The improved implementation follows the same principles as SQLite [1] and node.js [2]. Research for the fcntl() to fsync() fallback strategy: Apple's released source code at https://opensource.apple.com/ shows at least three different error codes being returned when a filesystem does not support F_FULLFSYNC. fcntl() is implemented in xnu-4903.221.2 in bsd/kern/kern_descrip.c, where it delegates to fcntl_nocancel(). The documentation for fcntl_nocancel() mentions error codes for some operations, but does not include F_FULLFSYNC. The F_FULLSYNC branch in fcntl_nocancel() calls VNOP_IOCTL(_, F_FULLSYNC, NULL, 0, _), whose return value sets the error code. VNOP_IOCTL() is implemented in bsd/vfs/kpi_vfs.c and calls the ioctl function in the vnode's operation vector. The per-filesystem function names follow the pattern _vnop_ioctl() for all the instances in opensource code: {hfs,msdosfs,nfs,ntfs,smbfs,webdav,zfs}_vnop_ioctl(). hfs-407.30.1, msdosfs-229.200.3, and nfs in xnu-4903.221.2 handle F_FULLFSYNC. ntfs-94.200.1 and smb-759.40.1 do not handle F_FULLFSYNC, and the default branch returns ENOSUP. webdav-380.200.1 also does not handle F_FULLFSYNC, but the default branch returns EINVAL. zfs-59 also does not handle F_FULLSYNC, and its default branch returns ENOTTY. From a different angle, Apple's ntfs-94.200.1 includes utility code that uses fcntl(F_FULLFSYNC) and falls back to fsync() just like we do, supporting the hypothesis that there is no good way to detect lack of F_FULLFSYNC support. Also, Apple's fcntl() man page [3] does not mention a way to detect lack of F_FULLFSYNC support. [1] https://www.sqlite.org/src/doc/trunk/src/os_unix.c [2] https://github.com/libuv/libuv/blob/master/src/unix/fs.c [3] https://developer.apple.com/library/archive/documentatiVon/System/Conceptual/ManPages_iPhoneOS/man2/fcntl.2.html Tested: https://travis-ci.org/pwnall/leveldb/builds/477318498 TAP global presubmit ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228593729
* Fix fdatasync() feature detection in opensource build.costan2019-01-082-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The CMake feature-detection code used check_symbol_exists(), which invokes the C compiler. However, some glibc versions don't expose the fdatasync() declaration when compiled with -std=c11, but do expose it when compiled with -std=c++11. This most likely comes down to how _POSIX_SOURCE is defined -- it needs to be >= 201112L for <unistd.h> to expose fdatasync(). This CL switches to check_cxx_symbol_exists(), which uses the C++ compiler. Asides from fixing the problem above, this is the right thing to do, because we use <unistd.h> in env_posix.cc, which is compiled with the C++ compiler. This CL also fixes a previously introduced inconsistency, where the macro indicating the fdatasync() feature detection result was referred to as HAVE_FDATASYNC and HAVE_FUNC_FDATASYNC. The former appears to be used in other libraries, so this CL switches all our references to HAVE_FDATASYNC. Fixes https://github.com/google/leveldb/issues/629 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228392612
* Add back space to POSIX Logger.cmumford2019-01-071-2/+2
| | | | | | | | | The space in between the header and log message was mistakenly omitted in a prior commit. Re-adding. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228202737
* Update Travis CI configuration.costan2019-01-021-22/+22
| | | | | | | | | | | | | | | | | The Travis CI configuration updates reflect the following changes: * Container-based builds (sudo: false) have been removed. https://changelog.travis-ci.com/the-container-based-build-environment-is-fully-deprecated-84517 * Ubuntu Xenial (16.04) is available as a base image. https://blog.travis-ci.com/2018-11-08-xenial-release * Homebrew now has a dedicated DSL. https://docs.travis-ci.com/user/installing-dependencies/#installing-packages-on-os-x To take full advantage of VM resources, CI builds now use Ninja https://ninja-build.org/ instead of Make. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=227611641
* Clean up env_posix.cc.costan2018-10-291-251/+296
| | | | | | | | | | | | | | | | | | | | | General cleanup principles: * Use override when applicable. * Remove static when redundant (methods and globals in anonymous namespaces). * Use const on class members where possible. * Standardize on "status" for Status local variables. * Renames where clarity can be improved. * Qualify standard library names with std:: when possible, to distinguish from POSIX names. * Qualify POSIX names with the global namespace (::) when possible, to distinguish from standard library names. This also refactors the background thread synchronization logic so that it's statically analyzable. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=219212089
* Rework once initialization in env_posix.cc.costan2018-09-241-14/+70
| | | | | | | | | | | | | | | | | | | | | | C++11 guarantees thread-safe initialization of static variables inside functions. This is a more restricted form of std::call_once or pthread_once_t (e.g., single call site), so the compiler might be able to generate better code [1]. Equally important, having less platform-dependent code in env_posix.cc makes it easier to port to other platforms. Due to the change above, this CL introduced a new approach for storing the singleton PosixEnv instance returned by Env::Default(). The new approach avoids a dynamic memory allocation, which eliminates the false positive from LeakSanitizer reported in https://github.com/google/leveldb/issues/539 and https://github.com/google/leveldb/issues/113 [1] https://stackoverflow.com/a/27206650/ ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=214293129
* C++11 cleanup for util/mutexlock.h.costan2018-09-241-3/+3
| | | | | | ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=213398583
* Update .gitignore.costan2018-09-241-9/+8
| | | | | | | | | The version in the repository covers the Makefile build. The new version is simpler and contains entries relevant to the CMake build. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=212661504
* Rework threading in env_posix.cc.costan2018-09-112-91/+80
| | | | | | | | | | | | | | | | | | | | This commit replaces the use of pthreads in the POSIX port with std::thread and port::Mutex + port::CondVar. This is intended to simplify porting the env to a different platform. The indirect use of pthreads in PosixLogger is replaced with std::thread::id(), based on an approach prototyped by @cmumfordx@. The pthreads dependency in CMakeFiles is not removed, because some C++ standard library implementations must be linked against pthreads for std::thread use. Figuring out this dependency is left for future work. Switching away from pthreads also fixes https://github.com/google/leveldb/issues/381 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=212478311
* Remove InitOnce from the port API.costan2018-09-106-29/+104
| | | | | | | | | | | | | | | | | | | | | | | | This is not an API-breaking change, because it reduces the API that the leveldb embedder must implement. The project will build just fine against ports that still implement InitOnce. C++11 guarantees thread-safe initialization of static variables inside functions. This is a more restricted form of std::call_once or pthread_once_t (e.g., single call site), so the compiler might be able to generate better code [1]. Equally important, having less code in port_example.h makes it easier to port to other platforms. Due to the change above, this CL introduces a new approach for storing the singleton BytewiseComparatorImpl instance returned by BytewiseComparator(). The new approach avoids a dynamic memory allocation, which eliminates the false positive from LeakSanitizer reported in https://github.com/google/leveldb/issues/200 [1] https://stackoverflow.com/a/27206650/ ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=212348004
* Clean up PosixWritableFile in env_posix.cc.costan2018-09-081-82/+117
| | | | | | | | | | | | | | | | | | | | | This is separated from the general cleanup because of the logic changes in SyncDirIfManifest(). General cleanup principles: * Use override when applicable. * Remove static when redundant (methods and globals in anonymous namespaces). * Use const on class members where possible. * Standardize on "status" for Status local variables. * Renames where clarity can be improved. * Qualify standard library names with std:: when possible, to distinguish from POSIX names. * Qualify POSIX names with the global namespace (::) when possible, to distinguish from standard library names. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=211709673
* Clean up posix_logger.h.costan2018-09-041-64/+94
| | | | | | | | | | | | | | | | | | | | General cleanup principles: * Use override when applicable. * Use const on class members where possible. * Renames where clarity can be improved. * Qualify standard library names with std:: when possible, to distinguish from POSIX names. * Qualify POSIX names with the global namespace (::) when possible, to distinguish from standard library names. This also revamps the logic for putting together a message into the in-memory buffer before that is passed to fwrite(). While correct in practice, the current implementation advances a char pointer past the size of its buffer, which is technically undefined behavior. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=211472570
* Remove ssize_t from code that is not POSIX-specific.costan2018-09-042-12/+15
| | | | | | | | | | | | | ssize_t is not standard C++. It is a POSIX extension. Therefore, it does not belong in generic code. This change tweaks the logic in DBIter to remove the need for signed integers, so ssize_t can be replaced with size_t. The impacted method and private member are renamed to better express their purpose. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=211471606
* Simplify Limiter in env_posix.cc.costan2018-09-041-33/+25
| | | | | | | | | | | Now that we require C++11, we can use std::atomic<int>, which has primitives for most of the logic we need. As a bonus, the happy path for Limiter::Acquire() and Limiter::Release() only performs one atomic operation. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=211469518
* Clarify comments for leveldb::Env file reading methods.costan2018-09-041-2/+2
| | | | | | | | | | "Create a brand new [adjective] file" seems like the description for a method that will create a new file, but is used for methods that open existing files for read access. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=211468002
* Remove GCC on OSX from the Travis CI matrix.costan2018-09-041-0/+7
| | | | | | | | | Equivalent of https://github.com/google/snappy/commit/db082d2cd6512981c28849d00dd47a4216768e10 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=211467181
* Expose WriteBatch::Append in the C API.costan2018-08-193-3/+16
| | | | | | ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=209345072
* Expose WriteBatch::Append().costan2018-08-143-4/+15
| | | | | | | | | WriteBatchInternal has a method for efficiently concatenating two WriteBatches. This commit exposes the method to the public API. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=208724311
* Clean up Iterator.costan2018-06-042-32/+45
| | | | | | | | | | | This CL renames the private struct Iterator::Cleanup -> Iterator::CleanupNode, to better reflect that it's a linked list node, and extracts duplicated code from its user in IsEmpty() and Run() methods. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=199175058
* Corrected typo in docs: "cache" to "block_cache".cmumford2018-06-041-4/+4
| | | | | | ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=197452015
* Clean up SnapshotImpl.costan2018-04-303-30/+102
| | | | | | | | | | | | | * Omit SnapshotImpl::list_ when assert() isn't on * Make SnapshotImpl::number_ const and set it in the constructor * Make SnapshotImpl::number_ private and access it via a getter * Rename SnapshotImpl::number_ to SnapshotImpl::sequence_number_ * Rename SnapshotList::list_ to SnapshotList::head_ * Wrap casting from Snapshot* to SnapshotImpl* in ToSnapshotImpl() ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=194852828
* Fix documentation for log file growth.cmumford2018-04-301-5/+7
| | | | | | | | This fixes #546 reported on GitHub. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=194549692
* Update default log file size in doc.cmumford2018-04-301-1/+1
| | | | | | | | | | | The default size was changed in #f779e7a5 but the documentation was never updated. This fixes #566 reported on GitHub. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=194547959
* Add move constructor to Status.costan2018-04-233-11/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will result in smaller code generation when Status instances are passed around. Benchmarks don't indicate a significant change either way. CPU: 48 * Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz CPUCache: 30720 KB Keys: 16 bytes each Values: 100 bytes each (50 bytes after compression) Entries: 1000000 RawSize: 110.6 MB (estimated) FileSize: 62.9 MB (estimated) Baseline: fillseq : 3.589 micros/op; 30.8 MB/s fillsync : 4165.299 micros/op; 0.0 MB/s (1000 ops) fillrandom : 5.864 micros/op; 18.9 MB/s overwrite : 7.830 micros/op; 14.1 MB/s readrandom : 5.534 micros/op; (1000000 of 1000000 found) readrandom : 4.292 micros/op; (1000000 of 1000000 found) readseq : 0.312 micros/op; 354.1 MB/s readreverse : 0.501 micros/op; 220.8 MB/s compact : 886211.000 micros/op; readrandom : 3.518 micros/op; (1000000 of 1000000 found) readseq : 0.251 micros/op; 441.2 MB/s readreverse : 0.456 micros/op; 242.4 MB/s fill100K : 1329.723 micros/op; 71.7 MB/s (1000 ops) crc32c : 1.976 micros/op; 1976.7 MB/s (4K per op) snappycomp : 4.705 micros/op; 830.2 MB/s (output: 55.1%) snappyuncomp : 0.958 micros/op; 4079.1 MB/s acquireload : 0.727 micros/op; (each op is 1000 loads) New: fillseq : 3.129 micros/op; 35.4 MB/s fillsync : 2748.099 micros/op; 0.0 MB/s (1000 ops) fillrandom : 5.394 micros/op; 20.5 MB/s overwrite : 7.253 micros/op; 15.3 MB/s readrandom : 5.655 micros/op; (1000000 of 1000000 found) readrandom : 4.425 micros/op; (1000000 of 1000000 found) readseq : 0.298 micros/op; 371.3 MB/s readreverse : 0.508 micros/op; 217.9 MB/s compact : 885842.000 micros/op; readrandom : 3.545 micros/op; (1000000 of 1000000 found) readseq : 0.252 micros/op; 438.2 MB/s readreverse : 0.425 micros/op; 260.2 MB/s fill100K : 1418.347 micros/op; 67.2 MB/s (1000 ops) crc32c : 1.987 micros/op; 1966.0 MB/s (4K per op) snappycomp : 4.767 micros/op; 819.4 MB/s (output: 55.1%) snappyuncomp : 0.916 micros/op; 4264.9 MB/s acquireload : 0.665 micros/op; (each op is 1000 loads) ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=194002392
* Replace port_posix with port_stdcxx.costan2018-04-176-135/+66
| | | | | | | | | | | | | | | The porting layer implements threading primitives: atomic pointers, condition variables, mutexes, thread-safe initialization. These are all specified in C++11, so the reference open source port implementation can become platform-independent. The porting layer will remain in place to allow the use of other implementations with more features, such as the built-in deadlock detection in abseil's Mutex. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193245934
* Fix sign mismatch warnings in GCC.MarcoFalke2018-04-162-2/+2
| | | | | | | | This was contributed in https://github.com/google/leveldb/pull/492 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193080913
* Add forgotten <limits> header to util/logging.cc.costan2018-04-131-0/+1
| | | | | | | | | Commit a0008deb679480fd30e845d7e52421af72160c2c introduced std::numeric_limits usage in logging.cc, but didn't #include <limits> ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192840190
* Reimplement ConsumeDecimalNumber.costan2018-04-131-19/+29
| | | | | | | | | | | | | | | | The old implementation caused odd crashes on ARM, which were fixed by changing a local variable type. The main suspect is the use of a static local variable. This CL replaces the static local variable with constexpr, which still ensures the compiler sees the expressions as constants. The CL also replaces Slice operations in the functions' inner loop with iterator-style pointer operations, which can help the compiler generate less code. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192832175
* Add tests for ConsumeDecimalNumber.costan2018-04-132-0/+146
| | | | | | | | | | ConsumeDecimalNumber has fairly non-trivial logic, and a previous version has crashed inexplicably on Android. Having some test coverage will make it easier to tweak / simplify the function later on. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192821751
* Document the building process.costan2018-04-111-1/+18
| | | | | | ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192490601
* Replace NULL with nullptr in C++ files.costan2018-04-1055-570/+575
| | | | | | ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192365747
* Remove PLATFORM_IS_LITTLE_ENDIAN from port/posix.h.costan2018-04-101-4/+0
| | | | | | | | | This is an accidental leftover from the CMake migration. The macro has been replaced with LEVELDB_IS_BIG_ENDIAN. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192364918
* Define LEVELDB_HAS_PORT_CONFIG_H for old compilers.costan2018-04-091-0/+33
| | | | | | | | | | | | The CMake-based build relies on __has_include, which is standardized in C++17. Unfortunately, __has_include is available without requiring --std=c++17 on all the compilers on CI, so this problem was not caught. Fixes https://github.com/google/leveldb/issues/572 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192208842
* Rename CMake project / targets from Leveldb to leveldb.costan2018-03-233-10/+10
| | | | | | ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=190262375
* leveldb: Add more thread safety annotations.costan2018-03-237-54/+64
| | | | | | | | After this CL, all classes with Mutex members should be covered by annotations. Exceptions are atomic members, which shouldn't need locking, and DBImpl members that cause errors when annotated, which will be tackled separately. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=190260865
* Take <atomic> for granted in port/atomic_pointer.h.costan2018-03-213-85/+5
| | | | | | | | | C++11 requires <atomic>. This lets us remove the header detection (LEVELDB_ATOMIC_PRESENT) and simplify port/atomic_pointer.h. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=189919098