sipa
commented at 2:20 PM on June 22, 2013:
member
This pull request still contains a "Remove leveldb in preparation for git-subtree", which was already done.
Can you rebase this, and only include relevant commits?
Code changes look good to me otherwise.
vinniefalco
commented at 3:53 PM on June 22, 2013:
contributor
Roger that, I have rewritten the branch. It will need to pass through the automated testing again, although in theory the files are still the same. But don't take my word for it! I rewrote public history.
vinniefalco
commented at 4:11 PM on June 22, 2013:
contributor
As per sipa's comments, if you want individual leveldb commits to appear in the bitcoin commit log instead of a squash, that can be done. But the price is that first the entire leveldb commit log must be merged into bitcoin's commit log once. After that, new commits to leveldb will appear incrementally.
sipa
commented at 4:15 PM on June 22, 2013:
member
I'd prefer to have access to the individual changes that were made to the leveldb subtree.
Ideally, the leveldb changes appear as individual commits in our repository, but that may be hard (I'm not familiar enough with git-subtree yet). An alternative is having a leveldb branch (or separate) repository under the bitcoin project, and occasionally pull changes from there through such a squashed commit as exists in this pullreq now. Other devs opinions? @gavinandresen@jgarzik@gmaxwell@laanwj?
vinniefalco
commented at 7:08 PM on June 22, 2013:
contributor
Updated the version of leveldb to 1.12.
mikehearn
commented at 10:16 AM on June 25, 2013:
contributor
LGTM. I didn't notice this pull also updated the version, my mistake. The diff is identical to what I got doing it the old fashioned way, so it seems like the upgrade is a no-brainer.
To copy what I wrote before, the fix for CompactRange() would be security sensitive if we ever used that call anywhere. Given the risk of someone introducing a call to that in future, we should ensure this upgrade does take place.
I don't care how the commits are represented one way or another. LevelDB is stable and doesn't change much. It hardly seems worth worrying about the optimal arrangement given that fact.
Diapolo
commented at 11:41 AM on June 25, 2013:
none
I vote for upgrading to the latest LevelDB also, as we seem to have quite a few strange related DB-corruption issues.
luke-jr
commented at 4:21 PM on June 25, 2013:
member
Has anyone done the necessary audit to be sure there aren't some uncontroversial bugfixes which could affect Bitcoin network behaviour?
vinniefalco
commented at 10:01 PM on June 27, 2013:
contributor
The repository for Ripple and Bitcoin's fork of LevelDB has been moved to the Ripple organization:
jgarzik
commented at 10:11 PM on June 27, 2013:
contributor
/me rather liked the in-tree attributes. That was one of the selling points in moving to leveldb from BDB: it would be in-tree, so no crazy version troubles due to strange linking.
vinniefalco
commented at 10:17 PM on June 27, 2013:
contributor
@jgarzik Yes, note that what you have now is "in-tree." What @sipa is asking is if you want to also have as a public repository, your fork of leveldb.
@sipa I say, why not add bitcoin/leveldb? There's no downside to it. You can either fork the one from ripple, or create your own empty repository and push to it like this:
# From your local bitcoin repository
# add a remote for bitcoin's fork of leveldb
git add leveldb git@github.com:bitcoin/leveldb.git
# add a remote for ripple's fork
git add ripple git@github.com:ripple/leveldb.git
# bring the ripple fork's ref into the local repo, so subtree-split can find it
git fetch ripple
# split out the commits to leveldb into its own branch
git subtree split -P src/leveldb -b leveldb
# push the recreated branch to bitcoin's repository.
# it will be called bitcoin-fork
git push leveldb leveldb:bitcoin-fork
@sipa You should try these steps anyway. You can always throw away the branch or repository. Get some practice with git-subtree, it's great!
sipa
commented at 10:18 PM on June 27, 2013:
member
@jgarzik No one suggests changing that. This is using git-subtree, so a copy of the LevelDB source is still inside our code, but there's a separate repository where development of our LevelDB tree can happen (it has significant changes, including a non-upstream Windows port with some patches by us). This way, the LevelDB code can live somewhat independently, but we can easily synchronize the in-repo copy.
One of the nice things about git-subtree is that it doesn't matter where that extra repository is maintained - it's only identified using commit ids. In a previous patch, we 'switched' to a tree that @vinniefalco extracted from our LevelDB history, and this commits pulls in changes that have been made there. My question is whether we wouldn't rather have such a LevelDB tree under github.com/bitcoin.
sipa
commented at 10:20 PM on June 27, 2013:
member
At some point I will make it work without the fancy macros and put it in our fork so anyone can use it.
mikehearn
commented at 8:59 AM on June 28, 2013:
contributor
To answer Luke, yes, I audited the changes and didn't see anything that
could cause desynchronization or other security issues. The FD limit was
raised but we did that already, I think.
On Fri, Jun 28, 2013 at 12:21 AM, Vinnie Falco notifications@github.comwrote:
Squashed 'src/leveldb/' changes from aca1ffc..ae6c262
ae6c262 Merge branch 'leveldb' into ripple-fork
28fa222 Looks like a bit more delay is needed to smooth the latency.
a18f3e6 Tidy up JobQueue, add ripple_core module
ab82e57 Release leveldb 1.12
02c6259 Release leveldb 1.11
5bbb544 Rate limit compactions with a 25ms pause after each complete file.
8c29c47 LevelDB issue 178 fix: cannot resize a level 0 compaction set
18b245c Added GNU/kFreeBSD kernel name (TARGET_OS)
8be9d12 CondVar::SignalAll was broken, leading to deadlocks on Windows builds. http://code.google.com/p/leveldb/issues/detail?id=149
c9fc070 Upgrade LevelDB to 1.10.0, mostly for better write stall logging.
8215b15 Tweak to variable name to support unity build
git-subtree-dir: src/leveldb
git-subtree-split: ae6c2620b2ef3d5c69e63dc0eda865d6a39fa061
adae78ea99
Merge commit 'adae78ea9940f4d44382967d1296e7db0b54a4de' into leveldb-squashedfb1da62318
vinniefalco closed this on Jul 1, 2013
vinniefalco reopened this on Jul 1, 2013
vinniefalco
commented at 3:39 PM on July 1, 2013:
contributor
I've amended the pull request to include Vaclav's changes from 6/12/2013:
Added GNU/kFreeBSD kernel name (TARGET_OS)
gmaxwell
commented at 9:08 PM on July 23, 2013:
contributor
Okay, I did a coinstate rebuild at height 248116 with this code and got a bit identical UTXO set at the end.
I had a little concern about the level 0 compaction fix because it looked like under some corner case conditions (and not just making a compact call) that it could screw up and lose some modifications to the database. Even if thats true, that kind of corruption hasn't happened for at least my node.
I do think we should just setup a bitcoin/leveldb and subtree that though. It looks like reparenting it is kind of obnoxious (creates a big diff), so when we do need to apply some leveldb patch it would better be a tree we control. Am I missing something here?
sipa referenced this in commit 83a3597071 on Jul 28, 2013
sipa merged this on Jul 28, 2013
sipa closed this on Jul 28, 2013
sipa
commented at 11:01 AM on July 28, 2013:
member
I think this code has had sufficient review, so I'm merging this.
I've since setup a bitcoin/leveldb repository, but I'm not familiar enough with git-subtree to set up things properly.
vinniefalco
commented at 11:25 AM on July 28, 2013:
contributor
You have my contact info, whenever you want I can teach you
On Sun, Jul 28, 2013 at 4:01 AM, Pieter Wuille notifications@github.comwrote:
I think this code has had sufficient review, so I'm merging this.
I've since setup a bitcoin/leveldb repository, but I'm not familiar enough
with git-subtree to set up things properly.
vinniefalco
commented at 4:03 AM on August 19, 2013:
contributor
@gmaxwell To apply a patch to leveldb all you need to do is split the subtree out of Bitcoin using "git subtree split", and it will become an orphaned branch in your local repo (a branch that doesn't share any history with bitcoin). Then you apply the level db patches to that branch. Finally, use "git subtree pull" or "git subtree merge" (preferably with --ff-only) on your local orphaned leveldb branch to bring the changes back in.
Once you have split your leveldb branch using "git subtree split" you can push it to your own remote leveldb repository and maintain it as a fork. Or not. Whatever you want to do. The files will still always exist as normal files in the bitcoin repo.
As usual contact me if you have questions.
mikehearn
commented at 9:11 AM on August 19, 2013:
contributor
I had a little concern about the level 0 compaction fix because it looked like
under some corner case conditions (and not just making a compact call) that
it could screw up and lose some modifications to the database.
I had the same concern when I saw it, so I checked with Sanjay and he said it could only occur if you manually used CompactRange. I guess he'd know, so I left it at that.
sipa
commented at 9:12 AM on August 19, 2013:
member
Note that the changes in this pull request have been superced by #2907 .
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-15 15:15 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me