mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
Merge pull request #6049 from bhandras/etcd_msg_size
etcd: make max message size configurable
This commit is contained in:
commit
ad78ff114f
6 changed files with 15 additions and 2 deletions
|
@ -5,7 +5,11 @@
|
||||||
* [Clean up Makefile by using go
|
* [Clean up Makefile by using go
|
||||||
install](https://github.com/lightningnetwork/lnd/pull/6035).
|
install](https://github.com/lightningnetwork/lnd/pull/6035).
|
||||||
|
|
||||||
|
* [Make etcd max message size
|
||||||
|
configurable]((https://github.com/lightningnetwork/lnd/pull/6049).
|
||||||
|
|
||||||
# Contributors (Alphabetical Order)
|
# Contributors (Alphabetical Order)
|
||||||
|
|
||||||
|
* Andras Banki-Horvath
|
||||||
* Naveen Srinivasan
|
* Naveen Srinivasan
|
||||||
* Oliver Gugger
|
* Oliver Gugger
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -46,7 +46,7 @@ require (
|
||||||
github.com/lightningnetwork/lnd/cert v1.1.0
|
github.com/lightningnetwork/lnd/cert v1.1.0
|
||||||
github.com/lightningnetwork/lnd/clock v1.1.0
|
github.com/lightningnetwork/lnd/clock v1.1.0
|
||||||
github.com/lightningnetwork/lnd/healthcheck v1.2.0
|
github.com/lightningnetwork/lnd/healthcheck v1.2.0
|
||||||
github.com/lightningnetwork/lnd/kvdb v1.2.1
|
github.com/lightningnetwork/lnd/kvdb v1.2.3
|
||||||
github.com/lightningnetwork/lnd/queue v1.1.0
|
github.com/lightningnetwork/lnd/queue v1.1.0
|
||||||
github.com/lightningnetwork/lnd/ticker v1.1.0
|
github.com/lightningnetwork/lnd/ticker v1.1.0
|
||||||
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796
|
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796
|
||||||
|
|
|
@ -30,6 +30,8 @@ type Config struct {
|
||||||
|
|
||||||
CollectStats bool `long:"collect_stats" description:"Whether to collect etcd commit stats."`
|
CollectStats bool `long:"collect_stats" description:"Whether to collect etcd commit stats."`
|
||||||
|
|
||||||
|
MaxMsgSize int `long:"max_msg_size" description:"The maximum message size in bytes that we may send to etcd."`
|
||||||
|
|
||||||
// SingleWriter should be set to true if we intend to only allow a
|
// SingleWriter should be set to true if we intend to only allow a
|
||||||
// single writer to the database at a time.
|
// single writer to the database at a time.
|
||||||
SingleWriter bool
|
SingleWriter bool
|
||||||
|
|
|
@ -141,7 +141,7 @@ func newEtcdBackend(ctx context.Context, cfg Config) (*db, error) {
|
||||||
DialTimeout: etcdConnectionTimeout,
|
DialTimeout: etcdConnectionTimeout,
|
||||||
Username: cfg.User,
|
Username: cfg.User,
|
||||||
Password: cfg.Pass,
|
Password: cfg.Pass,
|
||||||
MaxCallSendMsgSize: 16384*1024 - 1,
|
MaxCallSendMsgSize: cfg.MaxMsgSize,
|
||||||
}
|
}
|
||||||
|
|
||||||
if !cfg.DisableTLS {
|
if !cfg.DisableTLS {
|
||||||
|
|
|
@ -73,6 +73,10 @@ func DefaultDB() *DB {
|
||||||
AutoCompactMinAge: kvdb.DefaultBoltAutoCompactMinAge,
|
AutoCompactMinAge: kvdb.DefaultBoltAutoCompactMinAge,
|
||||||
DBTimeout: kvdb.DefaultDBTimeout,
|
DBTimeout: kvdb.DefaultDBTimeout,
|
||||||
},
|
},
|
||||||
|
Etcd: &etcd.Config{
|
||||||
|
// Allow at most 32 MiB messages by default.
|
||||||
|
MaxMsgSize: 32768 * 1024,
|
||||||
|
},
|
||||||
Postgres: &postgres.Config{
|
Postgres: &postgres.Config{
|
||||||
MaxConnections: defaultPostgresMaxConnections,
|
MaxConnections: defaultPostgresMaxConnections,
|
||||||
},
|
},
|
||||||
|
|
|
@ -1169,6 +1169,9 @@ litecoin.node=ltcd
|
||||||
; testing with embedded etcd.
|
; testing with embedded etcd.
|
||||||
; db.etcd.embedded_log_file=/path/etcd.log
|
; db.etcd.embedded_log_file=/path/etcd.log
|
||||||
|
|
||||||
|
; The maximum message size in bytes that we may send to etcd. Defaults to 32 MiB.
|
||||||
|
; db.etcd.max_msg_size=33554432
|
||||||
|
|
||||||
[postgres]
|
[postgres]
|
||||||
; Postgres connection string.
|
; Postgres connection string.
|
||||||
; db.postgres.dsn=postgres://lnd:lnd@localhost:45432/lnd?sslmode=disable
|
; db.postgres.dsn=postgres://lnd:lnd@localhost:45432/lnd?sslmode=disable
|
||||||
|
|
Loading…
Add table
Reference in a new issue