Commit Graph

58 Commits

Author SHA1 Message Date
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 cb062bded4 allow reads on disconnected followers (#121) 2017-08-04 05:28:35 -07:00
Josh Baker 1ccaf71375 add echo command (#201) 2017-07-27 09:10:33 -07:00
Josh Baker f9fa48db21 use redis-style expires
Updated the Tile38 expires to match the Redis implmentation at
https://redis.io/commands/expire#how-redis-expires-keys.

It now supports passive and active expires with sub-millisecond
accuracy.

This addresses issue #156
2017-03-29 12:50:04 -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
Josh Baker 49e1fcce7a Added CLIENT command
CLIENT LIST
CLIENT SETNAME name
CLIENT GETNAME
CLIENT KILL [ip:port] [ID client-id] [ADDR ip:port]

The CLIENT LIST command returns

  One client connection per line (separated by LF)
  Each line is composed of a succession of property=value
  fields separated by a space character.

  id: an unique 64-bit client ID
  addr: address/port of the clien
  age: total duration of the connection in seconds
  idle: idle time of the connection in seconds
  name: the name of the client

Suggested by @UriHendler, closes #139
2017-01-30 11:35:42 -07:00
Josh Baker 6b92d923d8 added debug log 2017-01-21 17:10:43 -07:00
w1n2k 69b62e97e3 Lock refactoring 2017-01-20 12:09:39 +03:00
w1n2k f0fb28c68d Implemented hot swap of autogc 2017-01-19 19:00:14 +03:00
w1n2k e65e5842f4 Implementing autogc configuration support 2017-01-19 11:23:42 +03:00
Josh Baker cadf6cb851 Added http-transport to SERVER call
* fixed index out of range error when --http-transport provided
  without value.
2017-01-13 08:53:01 -07:00
Pavel Makarenko a4e5d38461 Disable HTTP & WebSocket transports on demand. (#128)
* Added .idea folder into .gitignore

* Added --http-transport flag

* Fixed test & Removed some dumps

* Added support of yes/no
2017-01-13 08:45:28 -07:00
Josh Baker c02609ad44 Fixed missing response in TTL json command
Using the tile38-cli, the TTL command omitted the ttl value from the
json response.

For example:

    127.0.0.1:9851> TTL my ufo
    {"ok":true,"elapsed":"5.57µs"}

Is now fixed to show
    127.0.0.1:9851> TTL my ufo
    {"ok":true,"ttl":-1,"elapsed":"5.57µs"}

Where "ttl" is the remaining time before the object is is deleted.
The value -1 means that the object is available, but does not have
an expiration.

Thanks @phulst for finding this bug. closes #116
2017-01-07 09:27:36 -07:00
Josh Baker 73fd3cf7de Added PDEL command
PDEL key pattern

Removes all objects where the id matches the pattern

Thanks to @GameFreedom for the suggestion. closes #104
2016-12-29 07:53:01 -07:00
Josh Baker 5d378b8ec9 debug.FreeOSMemory 2016-12-22 14:52:37 -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 0afdf67c90 fix to aof corruption during aofshrink command.
This addresses an issue #73 that @huangpeizhi discovered while using
Tile38 in production where AOFSHRINK sometimes corrupts the database
causing the server to not start the next time.
2016-12-05 16:24:26 -07:00
Josh Baker 3b99a6276e grpc support 2016-09-11 21:25:09 -07:00
Josh Baker 89cfedeb08 added PDELHOOKS 2016-09-11 19:28:54 -07:00
Josh Baker a0872036d4 persistent endpoints 2016-09-11 19:28:54 -07:00
Josh Baker 3862f70cac refactor hooks and endpoints 2016-09-11 19:28:34 -07:00
Josh Baker 6d944ada32 fixed #49. fragmented pipeline requests. 2016-09-08 16:11:53 -07:00
Josh Baker adef76af22 type command 2016-08-26 13:42:52 -07:00
Josh Baker c81883a629 info command 2016-08-26 12:54:19 -07:00
Josh Baker c68e60ed2f write http response as three chunks 2016-08-26 07:35:19 -07:00
Josh Baker b73cc35749 fixed http response charset 2016-08-26 07:31:09 -07:00
Josh Baker 7b8c2dae85 http auth fixes #36 2016-08-25 05:25:20 -07:00
Josh Baker 1d427c849f Added BOUNDS command
It's now possible to get the combined minimum bounding rectangle for all
objects in a key by issuing the command "BOUNDS key".
2016-08-19 08:33:58 -07:00
Josh Baker 7455c52cb5 expires 2016-07-15 12:22:48 -07:00
Josh Baker b08c686c64 SEARCH command 2016-07-12 21:11:02 -06:00
Josh Baker 02ff2a70bf basic string support 2016-07-10 22:40:18 -06:00
Josh Baker 8d89198eaf wip. adding string value type. 2016-07-09 19:44:28 -07:00
Josh Baker 13626db762 added maxmemory setting fixes #15 2016-05-23 19:44:25 -07:00
Josh Baker 6b9468d01b lint cleanup 2016-04-02 19:16:36 -07:00
Josh Baker a3725c7a2a async hooks 2016-04-02 07:20:30 -07:00
Josh Baker cdc2bbee73 fence detect option 2016-04-01 12:46:39 -07:00
Josh Baker d9103d9dd6 kill aof conns after shrink 2016-03-31 18:20:42 -07:00
Josh Baker 9ece493a8e resp replication 2016-03-31 16:26:36 -07:00
Josh Baker 083f1f1ba1 wip: aof migration 2016-03-30 12:58:34 -07:00
Josh Baker 7f9b9b8abb fence updates 2016-03-30 09:32:38 -07:00
Josh Baker 4ce4e1af71 optional output formats 2016-03-29 12:29:15 -07:00
Josh Baker 4e2bbf1c33 resp config 2016-03-29 05:53:53 -07:00
Josh Baker a47377ae49 native output 2016-03-28 17:38:21 -07:00
Josh Baker f00d5ca9e8 resp stats 2016-03-28 16:11:29 -07:00
Josh Baker b11c619650 resp server 2016-03-28 15:50:18 -07:00
Josh Baker cdeb9d704b resp keys 2016-03-28 15:22:30 -07:00
Josh Baker 3f2977b300 resp search 2016-03-28 14:16:21 -07:00
Josh Baker ba9139be02 resp crud 2016-03-28 08:57:41 -07:00