Commit Graph

14 Commits

Author SHA1 Message Date
Oliver Gugger
724ca7a358
kvdb: exclude anything bbolt related from JS builds
Since bbolt uses syscalls for memory mapping that aren't available in
JS/WASM builds, we need to make sure we don't reference that code at
all. Otherwise we can't use parts of lnd as a library in projects that
are being compiled down to a WASM binary.
2021-07-22 09:47:37 +02:00
Oliver Gugger
73aa40f00e
lnwallet+kvdb: remove duplicate bdb backend imports
We only want to register the bbolt DB backend ("bdb") when we're not
compiling for a JS/WASM build targets. That's why we want to have that
import in only one file that we can add a build tag to. We remove it in
two other places since only one import is enough anyway.
2021-07-22 09:47:36 +02:00
Andras Banki-Horvath
bc4ffb489d
etcd: optionally reduce concurrency to single writer for legacy code 2021-07-20 21:02:11 +02:00
Andras Banki-Horvath
96caa6f242
etcd: remove assertion when creating bucket and value with the same key
This commit removes an assertion which is not needed because with etcd
we can safely create keys and values with the same key since they are
stored under different keys in the DB. This saves us one unnecessary Get
on every Put.
2021-07-16 16:06:32 +02:00
Andras Banki-Horvath
11a44a94b1
etcd: remove unnecessary iterator step from cursor Delete
The etcd cursor Delete stepped to the next item in the range before
Delete to not invalidate the iteation. This is unnecessary and not
compatible with bbolt, resulting in an extra fetch too.
2021-07-16 15:21:14 +02:00
Oliver Gugger
8acbe177fa
Merge pull request #5525 from bhandras/etcd_failover_itest_flake_fix
harness: remove killed nodes from active nodes
2021-07-15 17:27:07 +02:00
Andras Banki-Horvath
6dc64f7d2f
etcd: disable excessive logging when using embedded etcd 2021-07-15 15:35:38 +02:00
Joost Jager
e9cba1a526
kvdb/test: add bolt test 2021-07-12 11:31:11 +02:00
Joost Jager
f592375d1b
kvdb/test: fix cursor tests to match bbolt semantics
From bbolt docs:
// Seek positions the cursor at the passed seek key. If the key does not exist,
// the cursor is moved to the next key after seek. Returns the new pair.
2021-07-12 11:31:09 +02:00
Joost Jager
84490466be
kvdb/test: remove invalid operations
Accessing buckets that have been removed is not an allowed operation.
2021-07-12 11:31:07 +02:00
Joost Jager
3c6d35ec41
kvdb/test: generalize etcd tests 2021-07-12 11:31:05 +02:00
Andras Banki-Horvath
fc139d9bb8
kvdb: add ForEachBucket implementation 2021-05-13 10:35:35 +02:00
Andras Banki-Horvath
3c6f036bee
kvdb: make lnd/kvdb a submodule 2021-05-07 14:18:57 +02:00
Andras Banki-Horvath
14c851c8fc
kvdb: move channeldb/kvdb to top level 2021-05-07 14:18:56 +02:00