Commit Graph

23 Commits

Author SHA1 Message Date
tidwall 906824323b More graceful Tile38 shutdown 2022-09-25 06:28:17 -07:00
tidwall f2c3b3924a wip - aof tests 2022-09-25 03:54:22 -07:00
tidwall 13ceb7da41 Removed global variables from core package
The core package uses global variables that keep from having
more than one Tile38 instance runnning in the same process.

Move the core variables in the server.Options type which are
uniquely stated per Server instance.

The build variables are still present in the core package.
2022-09-24 15:44:32 -07:00
tidwall 5460998086 wip - fixing the empty response error 2022-09-24 06:22:58 -07:00
tidwall 5c455cbe10 Better HEALTHZ tests 2022-09-23 17:34:09 -07:00
tidwall d61f0bc6c8 wip - better tests 2022-09-23 07:30:03 -07:00
tidwall 579a41abae Merge branch 'housecanary-fix-knn' 2021-07-11 10:02:59 -07:00
Oliver de055384f9 add tests 2021-05-13 21:14:06 -04:00
Mike Poindexter fe6e3863ba Add bench tests for knn 2020-04-08 11:36:37 -07:00
Alex Roitman 31525487c3 Add timeout tests. Fix a bug. 2019-04-24 13:20:57 -07:00
tidwall 30f903bd51 Require properties member for geojson features 2019-02-12 06:49:13 -07:00
Alex Roitman 1cffdcc31f Add tests for the TEST comand 2019-02-08 13:58:04 -08:00
Steven Wolfe ffd8ca915c Testing for valid INFO and CLIENT Json output 2019-01-15 11:08:19 -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 7f1b311b3d added fence tests 2017-02-12 07:58:03 -07:00
Josh Baker 04290ec535 KNN results for NEARBY command
This commit includes the ability to search for k nearest neighbors using
a NEARBY command. When the LIMIT keyword is included and the 'meters'
param is excluded, the knn algorithm will be used instead of the
standard overlap+haversine algorithm.

   NEARBY fleet LIMIT 10 POINT 33.5 -115.8

This will find the 10 closest points to 33.5,-115.8.

closes #136, #130, and #138.
ping @tomquas, @joernroeder, and @m1ome
2017-01-30 16:41:12 -07:00
Josh Baker d6ca25d14b updated collection ReplaceOrInsert 10% bump 2016-12-30 18:12:18 -07:00
Josh Baker 44cf149325 added JSET, JGET, JDEL commands
JSET key id path value [RAW]
JGET key id path [RAW]
JDEL key id path

Allows for working with JSON strings, for example:

  JSET user 901 name Tom
  JGET user 901
  > '{"name":"Tom"}'
  JSET user 901 name.first Tom
  JSET user 901 name.last Anderson
  > '{"name":{"first":"Tom","last":"Anderson"}'
  JDEL user 901 name.last
  > '{"name":{"first":"Tom"}'

All commands use the GJSON path syntax, for more information:

  Setting JSON: https://github.com/tidwall/sjson
  Getting JSON: https://github.com/tidwall/gjson
2016-12-12 10:33:28 -07:00
Josh Baker 2e41d49c4b wip tests 2016-12-04 08:52:38 -07:00
Josh Baker a664bade48 added black-box testing 2016-12-02 09:14:34 -07:00
Josh Baker cc560646a7 correct log import 2016-09-08 21:37:00 -07:00
Josh Baker a49d1ddf15 test with very large keys 2016-09-08 16:27:28 -07:00
Josh Baker 6d944ada32 fixed #49. fragmented pipeline requests. 2016-09-08 16:11:53 -07:00