From 0fe22caef65310a27986d3de2f28761d73997b79 Mon Sep 17 00:00:00 2001 From: Thomas Rudin Date: Tue, 24 Dec 2019 23:35:48 +0100 Subject: [PATCH] remove mutex on tiledb --- tiledb/tiledb.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tiledb/tiledb.go b/tiledb/tiledb.go index 71a5c0a..c1a5f8e 100644 --- a/tiledb/tiledb.go +++ b/tiledb/tiledb.go @@ -1,16 +1,14 @@ package tiledb import ( - "github.com/prometheus/client_golang/prometheus" - "github.com/sirupsen/logrus" "io/ioutil" "mapserver/coords" "os" "strconv" - "sync" -) -var mutex = &sync.RWMutex{} + "github.com/prometheus/client_golang/prometheus" + "github.com/sirupsen/logrus" +) func New(path string) (*TileDB, error) { return &TileDB{ @@ -40,9 +38,6 @@ func (this *TileDB) GetTile(pos *coords.TileCoords) ([]byte, error) { timer := prometheus.NewTimer(tiledbLoadDuration) defer timer.ObserveDuration() - mutex.RLock() - defer mutex.RUnlock() - fields := logrus.Fields{ "pos": pos, } @@ -66,9 +61,6 @@ func (this *TileDB) SetTile(pos *coords.TileCoords, tile []byte) error { timer := prometheus.NewTimer(tiledbSaveDuration) defer timer.ObserveDuration() - mutex.Lock() - defer mutex.Unlock() - fields := logrus.Fields{ "pos": pos, "size": len(tile),