remove mutex on tiledb

This commit is contained in:
Thomas Rudin 2019-12-24 23:35:48 +01:00
parent 6ea40e1c16
commit 0fe22caef6

View File

@ -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),