From 1e91b9998c6f0723dc21d56aababb0797920ac1c Mon Sep 17 00:00:00 2001 From: NatureFreshMilk Date: Thu, 21 Feb 2019 08:12:20 +0100 Subject: [PATCH] remove tile-remove method --- server/tiledb/tiledb.go | 12 ------------ server/tiledb/tiledb_test.go | 11 ----------- 2 files changed, 23 deletions(-) diff --git a/server/tiledb/tiledb.go b/server/tiledb/tiledb.go index 394f2dc..a5cf569 100644 --- a/server/tiledb/tiledb.go +++ b/server/tiledb/tiledb.go @@ -65,15 +65,3 @@ func (this *TileDB) SetTile(pos *coords.TileCoords, tile []byte) error { return err } - -func (this *TileDB) RemoveTile(pos *coords.TileCoords) error { - timer := prometheus.NewTimer(removeDuration) - defer timer.ObserveDuration() - - err := this.db.Update(func(txn *badger.Txn) error { - err := txn.Delete(getKey(pos)) - return err - }) - - return err -} diff --git a/server/tiledb/tiledb_test.go b/server/tiledb/tiledb_test.go index beb9939..3a29b0e 100644 --- a/server/tiledb/tiledb_test.go +++ b/server/tiledb/tiledb_test.go @@ -35,17 +35,6 @@ func TestTileDB(t *testing.T) { t.Error("wrong size") } - db.RemoveTile(c) - - tile, err = db.GetTile(c) - if err != nil { - panic(err) - } - - if tile != nil { - t.Error("tile not removed") - } - c2 := coords.NewTileCoords(1, 0, 1, 2) tile, err = db.GetTile(c2) if err != nil {