You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when two Geofences were created via the SETHOOK command, where they listen to the same collection (but have a filter using WHERE), the WHERE command is ignored and instead they both emit an event at the same time.
To Reproduce
Create two points
SET teams/team1/assets point1 FIELD metadata {"teamRegionId":"f6b7d34a-8610-4bcc-bc87-eb1ae9cbe723"} POINT 42.929 -72.284
SET teams/team1/assets point2 FIELD metadata {"teamRegionId":"90b30c32-e730-4aa0-b92c-73746e390421"} POINT 42.929 -72.284
Create two geofences, both of them listening to the collection teams/team1/assets
teams/team1/geofences/geofence1/hook https://some-endpoint.com INTERSECTS teams/team1/assets WHERE 'metadata.teamRegionId == "f6b7d34a-8610-4bcc-bc87-eb1ae9cbe723"' OBJECT {"type":"Polygon","coordinates":[[[-72.2824967,42.9281719],[-72.2823465,42.9261137],[-72.2789025,42.9261529],[-72.2787738,42.9282112],[-72.2824967,42.9281719]]],"properties":{}}
teams/team1/geofences/geofence2/hook https://some-endpoint.com INTERSECTS teams/team1/assets WHERE 'metadata.teamRegionId == "90b30c32-e730-4aa0-b92c-73746e390421"' OBJECT {"type":"Polygon","coordinates":[[[-72.2824967,42.9281719],[-72.2823465,42.9261137],[-72.2789025,42.9261529],[-72.2787738,42.9282112],[-72.2824967,42.9281719]]],"properties":{}}
Move the first point, point1 inside the geofence teams/team1/geofences/geofence1/hook and teams/team1/geofences/geofence2/hook (you may ignore the other fields like metadata in this context)
SET teams/6a368f6d-8857-4e45-8e2b-7fdbcfb93ee0/assets point1 FIELD metadata {"teamRegionId":"f6b7d34a-8610-4bcc-bc87-eb1ae9cbe723"} POINT 42.927 -72.28
Expected behavior
As the first geofence geofence1 was created with a WHERE filter metadata.teamRegionId == "f6b7d34a-8610-4bcc-bc87-eb1ae9cbe723", geofence1 should be the only geofence to send an event to the webhook endpoint https://some-endpoint.com, but for some reason, the second geofence geofence2 also sends an event, even though it had a filter WHERE 'metadata.teamRegionId == "90b30c32-e730-4aa0-b92c-73746e390421"'
The same would happen if you move point2 inside geofence2. If that happens, geofence1 will also send an event even if point2 doesn't match geofence1's WHERE filter
Logs
N/A
Operating System (please complete the following information):
OS: Ubuntu 22.04.3 LTS
CPU: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Version: latest
Container: Docker
The text was updated successfully, but these errors were encountered:
iansalazar444
changed the title
Geofences listening to the same collection (with WHERE filter) emits at the same time
Different geofences listening to the same collection (but with a WHERE filter) emits an event at the same time
Feb 29, 2024
iansalazar444
changed the title
Different geofences listening to the same collection (but with a WHERE filter) emits an event at the same time
Different geofences listening to the same collection (but with a WHERE filter) emit an event at the same time
Feb 29, 2024
Describe the bug
Hi, everyone!
I noticed that when two Geofences were created via the
SETHOOK
command, where they listen to the same collection (but have a filter usingWHERE
), theWHERE
command is ignored and instead they both emit an event at the same time.To Reproduce
teams/team1/assets
point1
inside the geofenceteams/team1/geofences/geofence1/hook
andteams/team1/geofences/geofence2/hook
(you may ignore the other fields likemetadata
in this context)Expected behavior
As the first geofence
geofence1
was created with aWHERE
filtermetadata.teamRegionId == "f6b7d34a-8610-4bcc-bc87-eb1ae9cbe723"
,geofence1
should be the only geofence to send an event to the webhook endpointhttps://some-endpoint.com
, but for some reason, the second geofencegeofence2
also sends an event, even though it had a filterWHERE 'metadata.teamRegionId == "90b30c32-e730-4aa0-b92c-73746e390421"'
The same would happen if you move
point2
insidegeofence2
. If that happens,geofence1
will also send an event even ifpoint2
doesn't matchgeofence1
's WHERE filterLogs
N/A
Operating System (please complete the following information):
The text was updated successfully, but these errors were encountered: