aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-11-26 07:31:05 +0100
committerReto Brunner <reto@labrat.space>2020-12-02 09:06:34 +0100
commita9330f4c63816ed79f6d150e998f003bea9478dd (patch)
tree4e82a241e7dcddd594378bb80c599f23c323c755
parent7bc556740a519ebf486932d920ba9d9d59b25434 (diff)
downloadaerc-a9330f4c63816ed79f6d150e998f003bea9478dd.tar.gz
notmuch: remove gc close hooks
We frequently had issues with notmuch segfaulting and my guess is that this was due to the garbage collection magic used in the module. This changes to a fork that ripped the functionality out.
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--worker/notmuch/lib/database.go1
3 files changed, 5 insertions, 2 deletions
diff --git a/go.mod b/go.mod
index 2a5be540..9e324bd6 100644
--- a/go.mod
+++ b/go.mod
@@ -47,3 +47,5 @@ require (
replace golang.org/x/crypto => github.com/ProtonMail/crypto v0.0.0-20200420072808-71bec3603bf3
replace github.com/gdamore/tcell => git.sr.ht/~sircmpwn/tcell v0.0.0-20190807054800-3fdb6bc01a50
+
+replace github.com/zenhack/go.notmuch => github.com/brunnre8/go.notmuch v0.0.0-20201126061756-caa2daf7093c
diff --git a/go.sum b/go.sum
index cefdaac7..134b35b9 100644
--- a/go.sum
+++ b/go.sum
@@ -6,6 +6,8 @@ git.sr.ht/~sircmpwn/tcell v0.0.0-20190807054800-3fdb6bc01a50/go.mod h1:Hjvr+Ofd+
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/ProtonMail/crypto v0.0.0-20200420072808-71bec3603bf3 h1:JW27/kGLQzeM1Fxg5YQhdkTEAU7HIAHMgSag35zVTnY=
github.com/ProtonMail/crypto v0.0.0-20200420072808-71bec3603bf3/go.mod h1:Pxr7w4gA2ikI4sWyYwEffm+oew1WAJHzG1SiDpQMkrI=
+github.com/brunnre8/go.notmuch v0.0.0-20201126061756-caa2daf7093c h1:dh58QrW3/S/aCnQPFoeRRE9zMauKooDFd5zh1dLtxXs=
+github.com/brunnre8/go.notmuch v0.0.0-20201126061756-caa2daf7093c/go.mod h1:zJtFvR3NinVdmBiLyB4MyXKmqyVfZEb2cK97ISfTgV8=
github.com/creack/pty v1.1.10 h1:Xv3/hZlzZeTSMk5upBEt3iFdxWaPS3xYIm+BBySIqlY=
github.com/creack/pty v1.1.10/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
@@ -97,8 +99,6 @@ github.com/smartystreets/goconvey v0.0.0-20190710185942-9d28bd7c0945/go.mod h1:s
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/zenhack/go.notmuch v0.0.0-20190821052706-5a1961965cfb h1:eZBIw4TilXSAEYcWKf51bERhwH431YwntDYus0Bgxh0=
-github.com/zenhack/go.notmuch v0.0.0-20190821052706-5a1961965cfb/go.mod h1:zJtFvR3NinVdmBiLyB4MyXKmqyVfZEb2cK97ISfTgV8=
golang.org/x/image v0.0.0-20190523035834-f03afa92d3ff/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
diff --git a/worker/notmuch/lib/database.go b/worker/notmuch/lib/database.go
index ea6af93d..683ace58 100644
--- a/worker/notmuch/lib/database.go
+++ b/worker/notmuch/lib/database.go
@@ -70,6 +70,7 @@ func (db *DB) withConnection(writable bool, cb func(*notmuch.DB) error) error {
}
err := db.connect(writable)
if err != nil {
+ db.logger.Printf("failed to open the notmuch db: %v", err)
return err
}
}