tidwall / tile38

Real-time Geospatial and Geofencing
https://tile38.com
MIT License
9.14k stars 570 forks source link

PDELCHAN * "removes" non-existing channels #550

Open sergyv opened 4 years ago

sergyv commented 4 years ago

Describe the bug I run CHANS first to show all the channels. It returns empty array. But when I run PDELCHAN right after that it returns an array of "removed" channels

Expected behavior PDELCHAN expected to return empty array as well.

Logs Show CHANS:{"ok":true,"chans":[],"elapsed":"7.752µs"}

Remove CHANS:{"ok":true,"elapsed":"461ns"} {"ok":true,"elapsed":"77.198µs"} {"ok":true,"elapsed":"47.932µs"} {"ok":true,"elapsed":"38.663µs"} {"ok":true,"elapsed":"30.985µs"} {"ok":true,"elapsed":"47.264µs"} {"ok":true,"elapsed":"54.271µs"} {"ok":true,"elapsed":"29.049µs"} {"ok":true,"elapsed":"29.826µs"} {"ok":true,"elapsed":"24.208µs"} {"ok":true,"elapsed":"89.709µs"} {"ok":true,"elapsed":"32.238µs"} {"ok":true,"elapsed":"29.598µs"} {"ok":true,"elapsed":"32.488µs"} {"ok":true,"elapsed":"24.622µs"} {"ok":true,"elapsed":"25.601µs"} {"ok":true,"elapsed":"40.361µs"} {"ok":true,"elapsed":"26.121µs"} {"ok":true,"elapsed":"24.25µs"} {"ok":true,"elapsed":"25.196µs"} {"ok":true,"elapsed":"26.363µs"} {"ok":true,"elapsed":"25.156µs"} {"ok":true,"elapsed":"26.796µs"} {"ok":true,"elapsed":"24.557µs"} {"ok":true,"elapsed":"29.14µs"} {"ok":true,"elapsed":"25.298µs"} {"ok":true,"elapsed":"24.872µs"} {"ok":true,"elapsed":"24.034µs"} {"ok":true,"elapsed":"29.583µs"} {"ok":true,"elapsed":"28.546µs"} {"ok":true,"elapsed":"35.472µs"} {"ok":true,"elapsed":"35.814µs"} {"ok":true,"elapsed":"25.61µs"} {"ok":true,"elapsed":"36.862µs"} {"ok":true,"elapsed":"26.249µs"} {"ok":true,"elapsed":"26.967µs"} {"ok":true,"elapsed":"36.754µs"} {"ok":true,"elapsed":"31.425µs"} {"ok":true,"elapsed":"28.061µs"} {"ok":true,"elapsed":"30.556µs"} {"ok":true,"elapsed":"30.171µs"} {"ok":true,"elapsed":"25.33µs"} {"ok":true,"elapsed":"44.015µs"} {"ok":true,"elapsed":"37.523µs"} {"ok":true,"elapsed":"25.111µs"} {"ok":true,"elapsed":"29.682µs"} {"ok":true,"elapsed":"28.129µs"} {"ok":true,"elapsed":"37.088µs"} {"ok":true,"elapsed":"31.041µs"}

Operating System (please complete the following information): Ubuntu 18

tidwall commented 4 years ago

I'm unable to reproduce this.

By chance are you running this command from a terminal shell?

$ tile38-cli PDELCHAN *

If so, maybe your shell is expanding the * to include every file in the current directory? And, you might need to wrap the * in quotes.

$ tile38-cli PDELCHAN "*"
sergyv commented 4 years ago

using PHP TinyRedisClient like this:

print("\r\nRemove HOOKS:");
print($redis->__call("PDELHOOK", ["*"]) . "\r\n");

print("\r\nShow CHANS:");
print($redis->__call("CHANS", ["*"]) . "\r\n");

print("\r\nRemove CHANS:");
print($redis->__call("PDELCHAN", ["*"]) . `"\r\n");