Skip to content

Conversation

@sipa
Copy link
Member

@sipa sipa commented Aug 27, 2016

This upgrades the src/leveldb subtree to our version with upstream 1.19 merged in.

I've marked it here as [preview] because it depends on bitcoin-core/leveldb-subtree#14 being merged.

@laanwj
Copy link
Member

laanwj commented Aug 28, 2016

Concept ACK

@paveljanik
Copy link
Contributor

Configures OK, compiles OK, one warning removed:

leveldb/util/bloom.cc:50:26: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
    for (size_t i = 0; i < n; i++) {
                       ~ ^ ~
1 warning generated.

ACK

@maflcko maflcko added this to the 0.14.0 milestone Oct 29, 2016
sipa added 2 commits December 1, 2016 16:14
a31c8aa Add NewAppendableFile for win32 environment
1913d71 Merge upstream LevelDB 1.19
3080a45 Increase leveldb version to 1.19.
fa6dc01 A zippy change broke test assumptions about the size of compressed output. Fix the tests by allowing more slop in zippy's behavior. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=123432472
06a191b fix problems in LevelDB's caching code
a7bff69 Fix LevelDB build when asserts are enabled in release builds. (bitcoin#367)
ea992b4 Change std::uint64_t to uint64_t (bitcoin#354)
e84b5bd This CL fixes a bug encountered when reading records from leveldb files that have been split, as in a [] input task split.
3211343 Deleted redundant null ptr check prior to delete.
7306ef8 Merge pull request bitcoin#348 from randomascii/master
6b18316 Fix signed/unsigned mismatch on VC++ builds
adbe3eb Putting build artifacts in subdirectory.
2d0320a Merge pull request bitcoin#329 from ralphtheninja/travis-badge
dd1c3c3 add travis build badge
43fcf23 Merge pull request bitcoin#328 from cmumford/master
9fcae61 Added a Travis CI build file.
dac40d2 Merge pull request bitcoin#284 from ideawu/master
8ec241a Merge pull request bitcoin#317 from falvojr/patch-1
5d36bed Merge pull request bitcoin#272 from vapier/master
4753c9b Added a contributors section to README.md
e2446d0 Merge pull request bitcoin#275 from paulirish/patch-1
706b7f8 Resolve race when getting approximate-memory-usage property
3c9ff3c Only compiling TrimSpace on linux.
f8d205c Including atomic_pointer.h in port_posix
889de31 Let LevelDB use xcrun to determine Xcode.app path instead of using a hardcoded path.
528c2bc Add "approximate-memory-usage" property to leveldb::DB::GetProperty
359b6bc Add leveldb::Cache::Prune
50e77a8 Fix size_t/int comparison/conversion issues in leveldb.
5208e79 Added leveldb::Status::IsInvalidArgument() method.
ce45404 Suppress error reporting after seeking but before a valid First or Full record is encountered.
b9afa1f include <assert> -> <cassert>
edf2939 Update README.md
65190ac Will not reuse manifest if reuse_logs options is false.
ac1d69d LevelDB now attempts to reuse the preceding MANIFEST and log file when re-opened.
76bba13 fix indent
8fcceb2 log compaction output file's level along with number
0e0f074 documentation. improved link
c85addc readme: improved documentation link
ceff6f1 Fix Android/MIPS build.
77948e7 Add benchmark that measures cost of repeatedly opening the database.
34ad72e Move header guard below copyright banner.
a75d435 Clean up layering of storage/leveldb/...
b234f65 Added a new fault injection test.
c4c38f9 Add arm64 support to leveldb.
cea9b10 Fixed incorrect comment wording for Iterator::Seek.
c00c569 Deleted old README file.

git-subtree-dir: src/leveldb
git-subtree-split: a31c8aa408d5594830f7cb20ead1ef1dff51b79e
@sipa sipa changed the title [preview] LevelDB 1.19 LevelDB 1.19 Dec 2, 2016
@sipa
Copy link
Member Author

sipa commented Dec 2, 2016

Updated to include @laanwj's NewAppendableFile change (see bitcoin-core/leveldb-subtree#14). This should be tested on various platforms.

@laanwj
Copy link
Member

laanwj commented Dec 2, 2016

I'm testing this on Windows x86_64. Also going to test on ARM/Linux.

@sipa
Copy link
Member Author

sipa commented Dec 3, 2016

@laanwj My understanding is that the NewAppendableFile won't actually be used unless we enable the new options.reuse_logs option.

@laanwj
Copy link
Member

laanwj commented Dec 3, 2016

Ehm yes that seems the case. It is used in only two places and both are guarded by reuse_logs. I didn't notice the latter point.

  // EXPERIMENTAL: If true, append to existing MANIFEST and log files
  // when a database is opened.  This can significantly speed up open.
  //
  // Default: currently false, but may become true later.
  bool reuse_logs;

Reading the description, speeding up "open" isn't really an important concern for us at the moment.
Well at least we can switch the option on now if we wanted...

@sipa
Copy link
Member Author

sipa commented Dec 5, 2016

@laanwj When you run with a huge dbcache, sync a lot at once, and shutdown, the next startup takes a very long time. I believe that reuse_logs may improve upon that.

@laanwj
Copy link
Member

laanwj commented Dec 5, 2016

Going to merge this - gives the new version of leveldb some time to be tested in master before 0.14 is released.

I believe that reuse_logs may improve upon that.

The option is still experimental in leveldb so enabling it by default is probably not a good idea.

But I guess we could first add it too as an experimental feature enabled by a command-line argument.

@laanwj laanwj merged commit 605d701 into bitcoin:master Dec 5, 2016
laanwj added a commit that referenced this pull request Dec 5, 2016
634ad51 Squashed 'src/leveldb/' changes from 20ca81f..a31c8aa (Pieter Wuille)
@sipa sipa mentioned this pull request Jan 10, 2017
18 tasks
gandrewstone referenced this pull request in BitcoinUnlimited/BitcoinUnlimited May 2, 2017
[Backport] #8613: LevelDB 1.19
protonn pushed a commit to argentumproject/argentum that referenced this pull request Nov 1, 2017
codablock pushed a commit to codablock/dash that referenced this pull request Jan 17, 2018
634ad51 Squashed 'src/leveldb/' changes from 20ca81f..a31c8aa (Pieter Wuille)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
634ad51 Squashed 'src/leveldb/' changes from 20ca81f..a31c8aa (Pieter Wuille)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 25, 2019
634ad51 Squashed 'src/leveldb/' changes from 20ca81f..a31c8aa (Pieter Wuille)
zkbot added a commit to zcash/zcash that referenced this pull request Sep 25, 2020
Update LevelDB to upstream commit f545dfabf

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7911
- bitcoin/bitcoin#7982
- bitcoin/bitcoin#8133
- bitcoin/bitcoin#8784
  - Only the missing changes.
- bitcoin/bitcoin#8826
- bitcoin/bitcoin#8613
- bitcoin/bitcoin#10544
- bitcoin/bitcoin#10633
  - Only the changes to files and code we have.
- bitcoin/bitcoin#10806
- bitcoin/bitcoin#10958
- bitcoin/bitcoin#12451
- bitcoin/bitcoin#13925
- bitcoin/bitcoin#15270

This upgrades LevelDB in the exact same commit progression as upstream, up to January 2019.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants