Commit Graph

209 Commits

Author SHA1 Message Date
Josh Baker 11b42c020b Add flags to disable AOF or to use a custom path
New server flags:
  --appendonly     yes/no
  --appendfilename path

Please note that leaders that have disabled AOF cannot be followed.
2018-04-11 10:53:36 -07:00
Josh Baker 2b0a0cf93b Add meta data to hooks command
Closes #296
2018-04-10 11:54:32 -07:00
Josh Baker 2e7003bc31 Fix http requests not working
fixes #294
2018-04-09 08:27:04 -07:00
Josh Baker 248ccfbe8a Filter id match before kNN results
fixes #280
2018-03-09 19:50:34 -07:00
Josh Baker 9428b84484 added cpu and threads to stats 2018-03-09 17:24:23 -07:00
Josh Baker 70bdd49acb subsecond sleep option 2018-03-08 06:48:12 -07:00
Josh Baker c8353a18b2 aint tests 2018-03-06 22:07:38 -07:00
Josh Baker dc30f35646 safe atomic ints for rpi3, #269 2018-03-06 22:02:38 -07:00
Josh Baker 7538cc73ff avoid recover calls for non-lua queries
The defer recover() pattern is expensive and only Lua queries require
it, so for now we'll just check if lua is being used before calling.
2018-03-05 11:10:40 -07:00
Alex Roitman 29f4737e5d Add WHEREEVAL clause to scan/search commands. 2018-02-15 11:08:27 -08:00
Josh Baker 2088b5d2d2
Merge pull request #254 from rshura/fset_maxmemory
Add maxmemory protection to FSET
2018-01-30 11:17:13 -07:00
Josh Baker c62975b505 clear expires on reset, #258 2018-01-30 10:30:03 -07:00
Alex Roitman 47132af474 Add maxmemory protection to FSET 2018-01-23 15:54:10 -08:00
Josh Baker 8a4ccc8e99 Fix server crash when receiving zero arg commands.
fix #246
2018-01-15 10:53:08 -07:00
Josh Baker 1f70cb4e75 Precalculate and store bboxes for complex objects
This should increase the performance for most search operations such as
WITHIN, INTERSECTS, and NEARBY when dealing with complex polygons.
Geofencing should see a increase in throughput when dealing with a high
frequency of point -> polygon detection.

Addresses #245
2018-01-11 13:57:18 -07:00
Alex Roitman aa462f39cc Typos in the comments 2017-12-12 13:05:22 -08:00
Alex Roitman 28aebe856f Flush to file periodically 2017-12-11 16:12:15 -08:00
Alex Roitman 3fa209b1c0 Add json library (encode/decode methods) to lua. 2017-11-20 14:21:21 -08:00
Josh Baker fb6c29203b Merge branch 'fset_multi_xx' of https://github.com/rshura/tile38 into rshura-fset_multi_xx 2017-11-16 18:06:40 -07:00
Alex Roitman a3bf8b6572 Tweak multi-field fset to return the count of updated fields 2017-11-10 14:31:38 -08:00
Alex Roitman 79acc0efe5 Allow setting multiple fields in a single fset command. Add xx flag to fset. 2017-11-03 11:50:03 -07:00
Alex Roitman 1084c60805 Apply limit on top of cursor 2017-10-31 09:48:17 -07:00
Alex Roitman 4eca0cdee7 Attempt to fix NEARBY to filter prior to limiting. 2017-10-30 16:01:37 -07:00
Josh Baker 8b06aedf73 fix pipeline corruption 2017-10-18 17:32:45 -07:00
Alex Roitman f572b14a2e Support script_load and script_flush as separate tokens too. 2017-10-12 16:57:28 -07:00
Alex Roitman d0a510d9ff Prohibit creation of new globals in scripts (#227) 2017-10-06 07:32:04 -07:00
Alex Roitman bfa4bbe237 Lua (#225)
* Add periodic pruning of the lua state pool
2017-10-05 14:13:02 -07:00
Lenny Hartmann d6fe2eec96 Sqs endpoint (#221)
* test

* undo test

* Added aws SQS endpoint

* Added aws vendor

* Bug fixes

* enabled NOCOPY in build.sh
2017-10-05 14:08:03 -07:00
Alex Roitman b55300b729 Lua scripting feature. (#224)
* Start on lua scripting

* Implement evalsha, script load, script exists, and script flush

* Type conversions from lua to resp/json.
Refactor to make luastate and luascripts persistent in the controller.

* Change controller.command and all underlying commands to return resp.Value.
Serialize only during the ouput.

* First stab at tile38 call from lua

* Change tile38 into tile38.call in Lua

* Property return errors from scripts

* Minor refactoring.  No locking on script run

* Cleanup/refactoring

* Create a pool of 5 lua states, allow for more as needed. Refactor.

* Use safe map for scripts.  Add a limit for max number of lua states.  Refactor.

* Refactor

* Refactor script commands into atomic, read-only, and non-atomic classes.
Proper locking for all three classes.
Add tests for scripts

* More tests for scripts

* Properly escape newlines in lua-produced errors

* Better test for readonly failure

* Correctly convert ok/err messages between lua and resp.
Add pcall, sha1hex, error_reply, status_reply functions to tile38 namespace in lua.

* Add pcall test. Change writeErr to work with string argument

* Make sure eval/evalsha never attempt to write AOF

* Add eval-set and eval-get to benchmarks

* Fix eval benchmark tests, add more

* Improve benchmarks

* Optimizations and refactoring.

* Add lua memtest

* Typo

* Add dependency

* golint fixes

* gofmt fixes

* Add scripting commands to the core/commands.json

* Use ARGV for args inside lua
2017-10-05 08:20:40 -07:00
Josh Baker d4d51a8191 use redcon for loading aof 2017-10-04 16:15:20 -07:00
Josh Baker 1c8027c580 updated denied message 2017-10-04 15:58:52 -07:00
Josh Baker f8bc40d881 fix pipeling fragmentation 2017-10-04 13:07:56 -07:00
Josh Baker 86f9248a78 remove bsd file 2017-10-03 09:10:08 -07:00
Josh Baker 8d5f447e3e updated logger 2017-10-03 08:49:33 -07:00
Josh Baker d817814200 Optimized pipelining
Performance gains for pipelining commands over the network.
Using tile38-benchmark and the -P flag it's possible to see 2x-10x boost
in requests per second.
2017-09-30 19:34:25 -07:00
Josh Baker 1780badf1b isolated expires list mutex 2017-09-30 11:06:10 -07:00
Josh Baker a99613fe23 removed locks from memory bg operations 2017-09-30 08:16:34 -07:00
Josh Baker 4a3800596e added dev sleep command 2017-09-30 08:11:10 -07:00
Josh Baker 770c6ad322 atomic clients 2017-09-30 08:00:29 -07:00
Josh Baker 0db57db1f1 moved follow counter to atomic 2017-09-30 07:34:08 -07:00
Josh Baker 920dc3adb6 atomic ints/bools 2017-09-30 07:29:03 -07:00
Josh Baker 99307da6ea isolated config locks 2017-09-30 06:56:52 -07:00
Josh Baker d8f11354df wip config 2017-09-29 18:11:05 -07:00
Josh Baker b1da3a1ea5 Merge branch 'mqtt-endpoint' of https://github.com/m1ome/tile38 into m1ome-mqtt-endpoint 2017-09-04 07:22:25 -07:00
Josh Baker ff4db894a2 scan count with wherein, fixes #217 2017-09-04 07:20:03 -07:00
Josh Baker cf33e0f2af omit defaults on rewrite 2017-08-24 14:24:11 -07:00
Josh Baker 730502d99d keepalive default of 300 seconds 2017-08-24 14:15:07 -07:00
Alex Roitman c8ed7caa2e Add wherein command 2017-08-23 13:13:12 -07:00
Josh Baker bb7b6411b8 Close file aof before renaming for windows
Windows does not allow for renaming files that are use.

fixes #211

thanks @icewukong
2017-08-10 18:34:22 -07:00
Josh Baker cd057088d9 index optimizations 2017-08-10 17:32:40 -07:00