From 8d7290915efa641b7066a2c422d865fd555701f1 Mon Sep 17 00:00:00 2001
From: Josh Baker
Date: Wed, 16 Nov 2016 13:01:19 -0700
Subject: [PATCH 1/3] doc typos
---
README.md | 4 ++--
client/README.md | 4 ++--
controller/bing/ext.go | 2 +-
docker/README.md | 2 +-
geojson/object.go | 2 +-
index/rtree/rtreed.go | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index b41ba288..b7b72471 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ Tile38 is an open source (MIT licensed), in-memory geolocation data store, spati
- Spatial index with [search](#searching) methods such as Nearby, Within, and Intersects.
- Realtime [geofencing](#geofencing) through persistent sockets or [webhooks](http://tile38.com/commands/sethook).
- Object types of [lat/lon](#latlon-point), [bbox](#bounding-box), [Geohash](#geohash), [GeoJSON](#geojson), [QuadKey](#quadkey), and [XYZ tile](#xyz-tile).
-- Support for lots of [Clients Libraries](#client-libraries) written in many different langauges.
+- Support for lots of [Clients Libraries](#client-libraries) written in many different languages.
- Variety of protocols, including [http](#http) (curl), [websockets](#websockets), [telnet](#telnet), and the [Redis RESP](http://redis.io/topics/protocol).
- Server responses are [RESP](http://redis.io/topics/protocol) or [JSON](http://www.json.org).
- Full [command line interface](#cli).
@@ -203,7 +203,7 @@ The `detect` may be one of the following values.
All object types except for XYZ Tiles and QuadKeys can be stored in a collection. XYZ Tiles and QuadKeys are reserved for the SEARCH keyword only.
#### Lat/lon point
-The most basic object type is a point that is composed of a latitude and a longitude. There is an optional `z` member that may be used for auxilary data such as elevation or a timestamp.
+The most basic object type is a point that is composed of a latitude and a longitude. There is an optional `z` member that may be used for auxiliary data such as elevation or a timestamp.
```
set fleet truck1 point 33.5123 -112.2693 # plain lat/lon
set fleet truck1 point 33.5123 -112.2693 225 # lat/lon with z member
diff --git a/client/README.md b/client/README.md
index f0ec35a3..be9e861b 100644
--- a/client/README.md
+++ b/client/README.md
@@ -56,7 +56,7 @@ func main(){
}()
time.Sleep(time.Second / 2) // wait a moment
- // Retreive the point we just set.
+ // Retrieve the point we just set.
go func() {
conn, err := pool.Get() // get a conn from the pool
if err != nil {
@@ -71,4 +71,4 @@ func main(){
}()
time.Sleep(time.Second / 2) // wait a moment
}
-```
\ No newline at end of file
+```:q
\ No newline at end of file
diff --git a/controller/bing/ext.go b/controller/bing/ext.go
index af2f02f5..b9e73555 100644
--- a/controller/bing/ext.go
+++ b/controller/bing/ext.go
@@ -48,7 +48,7 @@ func TileXYToBounds(tileX, tileY int64, levelOfDetail uint64) (minLat, minLon, m
return
}
-// QuadKeyToBounds convers a quadkey to bounds
+// QuadKeyToBounds converts a quadkey to bounds
func QuadKeyToBounds(quadkey string) (minLat, minLon, maxLat, maxLon float64, err error) {
for i := 0; i < len(quadkey); i++ {
switch quadkey[i] {
diff --git a/docker/README.md b/docker/README.md
index 11e1062b..45159140 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -9,7 +9,7 @@ Tile38 is an open source (MIT licensed), in-memory geolocation data store, spati
- Spatial index with [search](#searching) methods such as Nearby, Within, and Intersects.
- Realtime [geofencing](#geofencing) through persistent sockets or [webhooks](http://tile38.com/commands/sethook).
- Object types of [lat/lon](#latlon-point), [bbox](#bounding-box), [Geohash](#geohash), [GeoJSON](#geojson), [QuadKey](#quadkey), and [XYZ tile](#xyz-tile).
-- Support for lots of [Clients Libraries](#client-libraries) written in many different langauges.
+- Support for lots of [Clients Libraries](#client-libraries) written in many different languages.
- Variety of protocols, including [http](#http) (curl), [websockets](#websockets), [telnet](#telnet), and the [Redis RESP](http://redis.io/topics/protocol).
- Server responses are [RESP](http://redis.io/topics/protocol) or [JSON](http://www.json.org).
- Full [command line interface](#cli).
diff --git a/geojson/object.go b/geojson/object.go
index dcf0545f..8cbd504d 100644
--- a/geojson/object.go
+++ b/geojson/object.go
@@ -76,7 +76,7 @@ type Object interface {
CalculatedPoint() Position
// JSON is the json representation of the object. This might not be exactly the same as the original.
JSON() string
- // String returns a string represenation of the object. This may be JSON or something else.
+ // String returns a string representation of the object. This may be JSON or something else.
String() string
// Bytes is the bytes representation of the object.
Bytes() []byte
diff --git a/index/rtree/rtreed.go b/index/rtree/rtreed.go
index fb947c86..15c2ec0f 100644
--- a/index/rtree/rtreed.go
+++ b/index/rtree/rtreed.go
@@ -281,7 +281,7 @@ func d3disconnectBranch(node *d3nodeT, index int) {
}
// Pick a branch. Pick the one that will need the smallest increase
-// in area to accomodate the new rectangle. This will result in the
+// in area to accommodate the new rectangle. This will result in the
// least total area for the covering rectangles in the current node.
// In case of a tie, pick the one which was smaller before, to get
// the best resolution when searching.
From 76ce0e58b232d831338320097799acd653a1e644 Mon Sep 17 00:00:00 2001
From: Josh Baker
Date: Thu, 17 Nov 2016 09:04:31 -0700
Subject: [PATCH 2/3] fix #84, roaming fence deadlock
---
controller/fence.go | 2 --
1 file changed, 2 deletions(-)
diff --git a/controller/fence.go b/controller/fence.go
index 16bb48f7..dc1cad7f 100644
--- a/controller/fence.go
+++ b/controller/fence.go
@@ -190,8 +190,6 @@ func fenceMatchObject(fence *liveFenceSwitches, obj geojson.Object) bool {
}
func fenceMatchRoam(c *Controller, fence *liveFenceSwitches, tkey, tid string, obj geojson.Object) (keys, ids []string, meterss []float64) {
- c.mu.RLock()
- defer c.mu.RUnlock()
col := c.getCol(fence.roam.key)
if col == nil {
return
From 7590498c4ffbf6d55ce43aa4226fc4b9892d880a Mon Sep 17 00:00:00 2001
From: Josh Baker
Date: Thu, 17 Nov 2016 09:22:17 -0700
Subject: [PATCH 3/3] 1.5.4
---
CHANGELOG.md | 4 ++++
README.md | 2 +-
build.sh | 4 +++-
docker/Dockerfile | 2 +-
4 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5a4fb6e3..2b838155 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
+## [1.5.4] - 2016-11-17
+### Fixed
+- #84: Hotfix - roaming fence deadlock
+
## [1.5.3] - 2016-11-16
### Added
- #4: Official docker support
diff --git a/README.md b/README.md
index b7b72471..64416123 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
-
+
Tile38 is an open source (MIT licensed), in-memory geolocation data store, spatial index, and realtime geofence. It supports a variety of object types including lat/lon points, bounding boxes, XYZ tiles, Geohashes, and GeoJSON.
diff --git a/build.sh b/build.sh
index 6cf8269c..2413f4b1 100755
--- a/build.sh
+++ b/build.sh
@@ -1,7 +1,7 @@
#!/bin/bash
set -e
-VERSION="1.5.3"
+VERSION="1.5.4"
PROTECTED_MODE="no"
# Hardcode some values to the core package
@@ -83,6 +83,8 @@ package(){
mv tile38-cli packages/$bdir
fi
cp README.md packages/$bdir
+ cp CHANGELOG.md packages/$bdir
+ cp LICENSE packages/$bdir
cd packages
if [ "$2" == "linux" ]; then
tar -zcf $bdir.tar.gz $bdir
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 22a03700..2e5d47f8 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,6 +1,6 @@
FROM alpine:3.4
-ENV TILE38_VERSION 1.5.3
+ENV TILE38_VERSION 1.5.4
ENV TILE38_DOWNLOAD_URL https://github.com/tidwall/tile38/releases/download/$TILE38_VERSION/tile38-$TILE38_VERSION-linux-amd64.tar.gz
RUN addgroup -S tile38 && adduser -S -G tile38 tile38