Commit Graph

12 Commits

Author SHA1 Message Date
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 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 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
Josh Baker 56e0bac24c TCP Keepalives
Enabled TCP keepalive packets to determine if the connection is still
valid, and terminate if needed. It also helps with maintaining idle
connections.

Default to 300 seconds and can be changed by:

    CONFIG SET keepalive 300

addresses #145: clients not being cleaned up properly
2017-02-09 10:01:59 -07:00
w1n2k e65e5842f4 Implementing autogc configuration support 2017-01-19 11:23:42 +03:00
Josh Baker a2fa6444b1 requirepass with no password with remove auth, fixes #39 2016-08-26 07:19:31 -07:00
Josh Baker 75adea6a9c scan order asc/desc 2016-07-12 13:18:16 -06:00
Josh Baker 13626db762 added maxmemory setting fixes #15 2016-05-23 19:44:25 -07:00
Josh Baker 4e2bbf1c33 resp config 2016-03-29 05:53:53 -07:00
Josh Baker 73ea8b8ee4 authentication resolves #3 2016-03-07 17:38:59 -07:00