Commit Graph

888 Commits

Author SHA1 Message Date
tidwall 9998e03f6f Optimization for non-cross geofence detection
This commit fixes a performance issue with the algorithm that
determines with geofences are potential candidates for
notifications following a SET operation.

Details

Prior to commit b471873 (10 commits ago) there was a bug where
the "cross" detection was not firing in all cases. This happened
because when looking for candidates for "cross" due to a SET
operation, only the geofences that overlapped the previous
position of the object and the geofences that overlapped the new
position where searched. But, in fac, all of the geofences that
overlapped the union rectangle of the old and new position should
have been searched.

That commit fixed the problem by searching a union rect of the
old and new positions. While this is an accurate solution, it
caused a slowdown on systems that have big/wild position changes
that might cross a huge number of geofences, even when those
geofences did not need actually need "cross" detection.

The fix

With this commit the geofences that have a "cross" detection
are stored in a seperated tree from those that do not. This
allows for a hybrid of the functionality prior and post b471873.

Fixes #583
2020-10-23 09:51:27 -07:00
tidwall 100be7be3c Added tests 2020-10-23 09:50:51 -07:00
tidwall 5b77c446a7 1.22.2 2020-10-07 10:12:47 -07:00
tidwall 93e3a067b7 Truncate trailing zeros from AOF at startup
This commit addresses issue #230, where an AOF file will sometimes
not load due to the file being padded with trailing zeros. It's
uncertain what is causing this corruption, but it appears to be
coming from outside of the tile38-server process. I suspect it's
due to some block store layer in Kubernetes/Docker cloud
environments.

This fix allows for Tile38 to start up by discovering the trailing
zeros while loading the AOF and safely truncating the file as to
not include the zeros in the future.
2020-10-07 09:52:32 -07:00
tidwall 3f87be18b4 Fixed typo 2020-09-22 16:55:31 -07:00
tidwall 8e35787e68 1.22.1 2020-09-22 16:52:03 -07:00
tidwall 9a34a378bb Updated Go version 2020-09-22 16:50:49 -07:00
tidwall b1dc463c41 Updated dependencies 2020-09-22 16:43:58 -07:00
tidwall 43cd87dc3a Merge branch 'master' of https://github.com/tidwall/tile38 2020-09-22 16:26:58 -07:00
Josh Baker 5edfccdc49
Merge pull request #563 from axvq/readme-b3q-go-client
Update README.md (Go client)
2020-09-22 16:24:52 -07:00
Josh Baker ad7c672a98
Merge pull request #575 from nkovacs/patch-1
Fix typo in usage
2020-09-22 16:24:17 -07:00
tidwall b47187349b Fix "cross" detection on firing in some cases
Fixes #578
2020-09-22 16:19:49 -07:00
Nikola Kovacs 8b271d1e0b
Fix typo in usage 2020-08-17 10:18:17 +02:00
tidwall bd572b0d38 1.22.0 2020-08-12 12:50:13 -07:00
tidwall d819db5f8b Added MONITOR command
closes #571
2020-08-12 12:38:52 -07:00
tidwall 9093926135 Limit geohash precision to 12 2020-08-12 10:58:49 -07:00
tidwall 25a954a6aa Merge branch 'superloach-master' 2020-08-12 10:57:49 -07:00
Terra Brown 9202fd0206
s/64/12/ 2020-08-11 18:11:06 -04:00
tidwall f23b46cfc0 Hotfix for previous commit 2020-07-04 10:35:07 -07:00
tidwall f3622c3756 Fixed wrong order for fields with SCAN
This commit fixes an issue that happens when running SCAN on a
collection that has objects with fields, causing field values
to be mismatched with their respective keys.

This only occured with json output, and is a regression from #534.

Fixes #569
2020-07-04 10:12:06 -07:00
tidwall 68e2b6d736 Updated Kafka version 2020-07-03 11:57:15 -07:00
tidwall 712da8aefa Updated Kafka client 2020-06-24 14:20:22 -07:00
Josh Baker 6629eba8bf
Merge pull request #566 from larsw/larsw/fencing-crash-fix
Fix crash in fenceMatchRoam causing an index out of range panic
2020-06-24 09:48:44 -07:00
Lars Wilhelmsen 4fdbade7a4
Fix crash in fenceMatchRoam causing an index out of range panic 2020-06-18 15:43:18 +02:00
tidwall c1ba2d86aa 1.21.1 2020-06-04 13:01:30 -07:00
tidwall b7978f2cf4 Fix OUTPUT client command requiring authentication
This commit fixes an issue where the OUTPUT command requires
authentication when a server password has been set with
CONFIG SET requirepass. This was causing problems with clients
that use json responses, like the tile38-cli.

Fixes #564
2020-06-04 12:57:23 -07:00
b3q b2cf3c7f11
Update README.md (Go client) 2020-06-04 01:19:18 +05:00
tidwall 9c6be0f78e 1.20.0 2020-05-20 15:28:07 -07:00
tidwall 3718cd766b Added priority option for AMQP endpoints 2020-05-16 14:31:52 -07:00
tidwall 70cd167fc0 Fixed clip test #558 2020-05-03 09:59:49 -07:00
Josh Baker f02dee3db2
Merge pull request #545 from tidwall/index-kind-geometry-nooverride
Match geometry indexing to server config
2020-04-02 08:15:38 -07:00
Josh Baker 12a98c53e4
Merge pull request #543 from rshura/fix-clip-empty-rings
Skip empty rings when clipping polygons.
2020-04-02 08:15:14 -07:00
tidwall 951fc58e02 Match geometry indexing to server config 2020-03-25 15:35:31 -07:00
tidwall b3dc025545 Optimize point in ring 2020-03-25 15:07:14 -07:00
tidwall 5162ac5fd7 Stable sort roam notifications 2020-03-25 13:01:11 -07:00
tidwall a99df2892a Fixed false faraway notifications 2020-03-25 12:47:55 -07:00
Alex Roitman c4b1dd3a72 Skip empty rings when clipping polygons.
Add a test for skipping empty rings.
2020-03-23 16:11:46 -07:00
tidwall cd70a3d2af Update to Go 1.14 2020-03-22 13:14:08 -07:00
tidwall ff48054d3d Fixed a missing faraway event for roaming geofences
This commit fixes a case where a roaming geofence will not fire
a "faraway" event when it's supposed to.

The fix required rewriting the nearby/faraway detection logic. It
is now much more accurate and takes overall less memory, but it's
also a little slower per operation because each object proximity
is checked twice per update. Once to compare the old object's
surrounding, and once to evaulated the new object. The two lists
are then used to generate accurate "nearby" and "faraway" results.
2020-03-22 11:54:56 -07:00
tidwall b482206894 Minimize sorting of collection fields 2020-03-22 07:58:03 -07:00
Josh Baker 0997f2e82b
Merge pull request #534 from rshura/optimize-scanwriter
Avoid sorting fields for each written object.
2020-03-22 06:33:33 -07:00
Josh Baker 77d33df542
Merge pull request #541 from tidwall/missing-key-field
Fixed DEL geofence notifications missing "key" field
2020-03-21 18:22:54 -07:00
tidwall 65943e8f1a Fixed DEL geofence notifications missing "key" field
Closed #538
2020-03-21 17:48:31 -07:00
tidwall 957233c298 Fixed issue with some features not working with WITHIN
This bug was fixed in the geojson dependency.

https://github.com/tidwall/geojson/pull/15

Closed #539
2020-03-21 17:38:14 -07:00
tidwall 81e449afef Merge branch 'mpoindexter-fix-race-in-replconf' 2020-03-21 17:30:41 -07:00
Mike Poindexter 84cabd77f9 Fix a concurrent write/read on the server conn map 2020-03-20 16:47:13 -07:00
Alex Roitman 5faccc3b4c Avoid sorting fields for each written object. 2020-03-03 13:39:43 -08:00
tidwall 0490734b74 1.19.5 2020-02-11 11:03:20 -07:00
tidwall c567512600 Fix packages not vendoring on build 2020-02-11 11:02:15 -07:00
tidwall 6ffdf7b0ef Add release helper file 2020-02-10 05:43:10 -07:00