From 991963268a2db7587d3514c019a4dded2019a46e Mon Sep 17 00:00:00 2001 From: tidwall Date: Sat, 10 Jul 2021 19:29:25 -0700 Subject: [PATCH] Fix last merge --- cmd/tile38-server/main.go | 1 - internal/collection/collection.go | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/tile38-server/main.go b/cmd/tile38-server/main.go index 8052060d..4b2e14f4 100644 --- a/cmd/tile38-server/main.go +++ b/cmd/tile38-server/main.go @@ -419,7 +419,6 @@ Developer Options: if showThreadsDisabled { log.Warnf("thread flag is deprecated use GOMAXPROCS to set number of threads instead") } - if err := server.Serve(host, port, dir, httpTransport, *metricsAddr); err != nil { log.Fatal(err) } diff --git a/internal/collection/collection.go b/internal/collection/collection.go index 87c39059..3d3cb5e5 100644 --- a/internal/collection/collection.go +++ b/internal/collection/collection.go @@ -62,8 +62,9 @@ type Collection struct { // New creates an empty collection func New() *Collection { col := &Collection{ - index: geoindex.Wrap(&rbang.RTree{}), - values: btree.New(32, nil), + items: btree.New(byID), + index: geoindex.Wrap(&rtree.RTree{}), + values: btree.New(byValue), fieldMap: make(map[string]int), fieldArr: make([]string, 0), fieldValues: &fieldValues{}, @@ -354,7 +355,7 @@ func (c *Collection) Scan( return true } nextStep(count, cursor, deadline) - iitm := value.(*itemT) + iitm := item.(*itemT) keepon = iterator(iitm.id, iitm.obj, c.fieldValues.get(iitm.fieldValuesSlot)) return keepon }