From 63d2c8ad0dcfab3f7034530fa75cdbe6270960df Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Tue, 25 Oct 2016 11:16:16 -0700 Subject: [PATCH 1/2] Allow client to set boltdb timeout - also in case of no persistent connection Signed-off-by: Alessandro Boch --- store/boltdb/boltdb.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/store/boltdb/boltdb.go b/store/boltdb/boltdb.go index 4026e0a2..cdfd74f8 100644 --- a/store/boltdb/boltdb.go +++ b/store/boltdb/boltdb.go @@ -59,6 +59,7 @@ func New(endpoints []string, options *store.Config) (store.Store, error) { db *bolt.DB err error boltOptions *bolt.Options + timeout = transientTimeout ) if len(endpoints) > 1 { @@ -82,11 +83,15 @@ func New(endpoints []string, options *store.Config) (store.Store, error) { } } + if options.ConnectionTimeout != 0 { + timeout = options.ConnectionTimeout + } + b := &BoltDB{ client: db, path: endpoints[0], boltBucket: []byte(options.Bucket), - timeout: transientTimeout, + timeout: timeout, PersistConnection: options.PersistConnection, } From 1720c9844816dfa0ec862cae7197a4b6369acce7 Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Tue, 8 Nov 2016 16:46:01 -0800 Subject: [PATCH 2/2] Upgrade go version in travis.yml - To fix CI Signed-off-by: Alessandro Boch --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 23ef6e05..a7a3bcff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - 1.5.3 + - 1.7.1 # let us have speedy Docker-based Travis workers sudo: false