-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* skeleton redis server * integration test * process functions added, no processing done yet * update how argument #s are handled; implement ping * ping works * use a single test config * rename to slimredis; will build data structure on cuckoo for now * fix ping with argument
- Loading branch information
Yao Yue
authored
Apr 20, 2018
1 parent
48270ca
commit 238e5e5
Showing
32 changed files
with
825 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
debug_log_level: 6 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,23 @@ | ||
#pragma once | ||
|
||
/* | ||
* Note: negative # of arguments means variable number of arguments: | ||
* e.g. `-2' means at least two arguments. This notation is inherited from | ||
* the original Redis server implementation. | ||
*/ | ||
|
||
/* type string # of args */ | ||
#define REQ_HASH(ACTION) \ | ||
ACTION( REQ_HDEL, "hdel", -3 )\ | ||
ACTION( REQ_HDELALL, "hdelall", 2 )\ | ||
ACTION( REQ_HEXISTS, "hexists", 3 )\ | ||
ACTION( REQ_HGET, "hget", 3 )\ | ||
ACTION( REQ_HGETALL, "hgetall", 2 )\ | ||
ACTION( REQ_HINCRBY, "hincrby", 4 )\ | ||
ACTION( REQ_HINCRBYFLOAT, "hincrbyfloat", 4 )\ | ||
ACTION( REQ_HKEYS, "hkeys", 2 )\ | ||
ACTION( REQ_HLEN, "hlen", 2 )\ | ||
ACTION( REQ_HMGET, "hmget", -3 )\ | ||
ACTION( REQ_HMSET, "hmset", -4 )\ | ||
ACTION( REQ_HSET, "hset", 4 )\ | ||
ACTION( REQ_HSETNX, "hsetnx", 4 )\ | ||
ACTION( REQ_HSTRLEN, "hstrlen", 3 )\ | ||
ACTION( REQ_HVALS, "hvals", 2 )\ | ||
ACTION( REQ_HSCAN, "hscan", -3 ) | ||
ACTION( REQ_HDEL, "hdel", 3, -1 )\ | ||
ACTION( REQ_HDELALL, "hdelall", 2, 0 )\ | ||
ACTION( REQ_HEXISTS, "hexists", 3, 0 )\ | ||
ACTION( REQ_HGET, "hget", 3, 0 )\ | ||
ACTION( REQ_HGETALL, "hgetall", 2, 0 )\ | ||
ACTION( REQ_HINCRBY, "hincrby", 4, 0 )\ | ||
ACTION( REQ_HINCRBYFLOAT, "hincrbyfloat", 4, 0 )\ | ||
ACTION( REQ_HKEYS, "hkeys", 2, 0 )\ | ||
ACTION( REQ_HLEN, "hlen", 2, 0 )\ | ||
ACTION( REQ_HMGET, "hmget", 3, -1 )\ | ||
ACTION( REQ_HMSET, "hmset", 4, -1 )\ | ||
ACTION( REQ_HSET, "hset", 4, 0 )\ | ||
ACTION( REQ_HSETNX, "hsetnx", 4, 0 )\ | ||
ACTION( REQ_HSTRLEN, "hstrlen", 3, 0 )\ | ||
ACTION( REQ_HVALS, "hvals", 2, 0 )\ | ||
ACTION( REQ_HSCAN, "hscan", 3, 0 ) | ||
|
||
/* "hlen KEY" == "*2\r\n$4\r\nhlen\r\n$3\r\nKEY\r\n" */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#pragma once | ||
|
||
/* type string # of args */ | ||
#define REQ_MISC(ACTION) \ | ||
ACTION( REQ_PING, "ping", -1 )\ | ||
ACTION( REQ_QUIT, "quit", 1 ) | ||
/* type string #arg#opt */ | ||
#define REQ_MISC(ACTION) \ | ||
ACTION( REQ_FLUSHALL, "flushall", 1, 0 )\ | ||
ACTION( REQ_PING, "ping", 1, 1 )\ | ||
ACTION( REQ_QUIT, "quit", 1, 0 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
#pragma once | ||
|
||
/* type string # of args */ | ||
#define REQ_ZSET(ACTION) \ | ||
ACTION( REQ_ZADD, "zadd", -4 )\ | ||
ACTION( REQ_ZINCRBY, "zincrby", 4 )\ | ||
ACTION( REQ_ZREM, "zrem", -3 )\ | ||
ACTION( REQ_ZREMRANGEBYSCORE, "zremrangebyscore", 4 )\ | ||
ACTION( REQ_ZREMRANGEBYRANK, "zremrangebyrank", 4 )\ | ||
ACTION( REQ_ZREMRANGEBYLEX, "zremrangebylex", 4 )\ | ||
ACTION( REQ_ZUNIONSTORE, "zunionstore", -4 )\ | ||
ACTION( REQ_ZINTERSTORE, "zinterstore", -4 )\ | ||
ACTION( REQ_ZRANGE, "zrange", -4 )\ | ||
ACTION( REQ_ZRANGEBYSCORE, "zrangebyscore", -4 )\ | ||
ACTION( REQ_ZREVRANGEBYSCORE, "zrevrangebyscore", -4 )\ | ||
ACTION( REQ_ZRANGEBYLEX, "zrangebylex", -4 )\ | ||
ACTION( REQ_ZREVRANGEBYLEX, "zrevrangebylex", -4 )\ | ||
ACTION( REQ_ZCOUNT, "zcount", 4 )\ | ||
ACTION( REQ_ZLEXCOUNT, "zlexcount", 4 )\ | ||
ACTION( REQ_ZREVRANGE, "zrevrange", -4 )\ | ||
ACTION( REQ_ZCARD, "zcard", 2 )\ | ||
ACTION( REQ_ZSCORE, "zscore", 3 )\ | ||
ACTION( REQ_ZRANK, "zrank", 3 )\ | ||
ACTION( REQ_ZREVRANK, "zrevrank", 3 )\ | ||
ACTION( REQ_ZSCAN, "zscan", -3 ) | ||
#define REQ_ZSET(ACTION) \ | ||
ACTION( REQ_ZADD, "zadd", 4, -1 )\ | ||
ACTION( REQ_ZINCRBY, "zincrby", 4, 0 )\ | ||
ACTION( REQ_ZREM, "zrem", 3, -1 )\ | ||
ACTION( REQ_ZREMRANGEBYSCORE, "zremrangebyscore", 4, 0 )\ | ||
ACTION( REQ_ZREMRANGEBYRANK, "zremrangebyrank", 4, 0 )\ | ||
ACTION( REQ_ZREMRANGEBYLEX, "zremrangebylex", 4, 0 )\ | ||
ACTION( REQ_ZUNIONSTORE, "zunionstore", 4, -1 )\ | ||
ACTION( REQ_ZINTERSTORE, "zinterstore", 4, -1 )\ | ||
ACTION( REQ_ZRANGE, "zrange", 4, -1 )\ | ||
ACTION( REQ_ZRANGEBYSCORE, "zrangebyscore", 4, -1 )\ | ||
ACTION( REQ_ZREVRANGEBYSCORE, "zrevrangebyscore", 4, -1 )\ | ||
ACTION( REQ_ZRANGEBYLEX, "zrangebylex", 4, -1 )\ | ||
ACTION( REQ_ZREVRANGEBYLEX, "zrevrangebylex", 4, -1 )\ | ||
ACTION( REQ_ZCOUNT, "zcount", 4, 0 )\ | ||
ACTION( REQ_ZLEXCOUNT, "zlexcount", 4, 0 )\ | ||
ACTION( REQ_ZREVRANGE, "zrevrange", 4, -1 )\ | ||
ACTION( REQ_ZCARD, "zcard", 2, 0 )\ | ||
ACTION( REQ_ZSCORE, "zscore", 3, 0 )\ | ||
ACTION( REQ_ZRANK, "zrank", 3, 0 )\ | ||
ACTION( REQ_ZREVRANK, "zrevrank", 3, 0 )\ | ||
ACTION( REQ_ZSCAN, "zscan", 3, -1 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.