Age | Commit message (Collapse) | Author |
|
This commit updates ZPOPMIN/ZPOPMAX to return the same format that
zRange WITHSCORES and zRangeByScore WITHSCORES does.
In addition the blocking variants BZPOPMIN and BZPOPMAX are implemented.
|
|
|
|
This addresses #1502, #1487
|
|
|
|
|
|
|
|
|
|
Streams API
|
|
Conflicts:
redis_session.c
tests/RedisTest.php
|
|
|
|
|
|
This commit implements UNLINK for Redis, RedisCluster, and RedisArray.
To a client library UNLINK behaves identically to DEL so we can use the
same handlers for both.
|
|
* Use a precalculated SHA1 of our lock release script and first
attempt to EVALSHA the script while falling back to EVAL if that
fails. This means that the very first time we attempt to release
a lock after server restart or script cache will fail but subsequent
attempts will succeed as Redis will cache the script automatically.
* Reorganized the new locking prototypes by making them static and removing
them from the header file as they never need to be called from outside
of redis_session.c anyway. Did the same for the lock_secret structure
as we don't need to expose the structure externally.
* Consolidated allocation and deallocation of lock pointers such that our
redis_pool "constructor" and "desctructor" handle that as well.
* Updating how we release the lock means we no longer need the new REDIS_G
module globals, so those were removed.
* HOST_NAME_MAX doesn't exist on OSX so added some preprocessor logic around that
Still a WIP as it needs more testing as I'm sure I broke *something* :-)
|
|
use estrdup for filling
|
|
|
|
|
|
|
|
|
|
Since we don't do anything while request start/end we may safely remove
PHP_RINIT and PHP_RSHUTDOWN functions.
|
|
|
|
|
|
|
|
Change multi, pipeline and remove unused prototypes
|
|
|
|
`hStrLen` command
|
|
|
|
|
|
|
|
|
|
|
|
All tests passed. \o/
|
|
|
|
|
|
To avoid users confusion, this is NOT a released version
And use something > last released version.
|
|
This commit adds initial support for the new GEO commands.
Presently the more complicated GEORADIUS[BYMEMBER] command
doesn't do much post-processing of the response, but will
probably be modified in the future to return it in a more
php friendly way.
|
|
Presently, the sAdd command is variadic, meaning that it takes a key
and then 1 to N additional arguments for the members being added. We
need to keep this functionality to avoid breaking existing code,
but there are good performance and other reasons to have an sAdd
command which takes a key followed by an array of members, which is
what the sAddArray method implements.
|
|
|
|
|
|
Rename command to rawCommand() as it's named in phpredis proper
This introspection function will inform the caller what mode phpredis
is in (atomic, pipeline, multi)
Conflicts:
php_redis.h
|
|
This commit just backports the newer and improved multi-bulk
processing for various commands (e.g. zrange, hmget,etc) from
develop into feature/redis_cluster
Also modified getbit to treat the value as a long
|
|
Implement the new COMMAND command in Redis for both cluster and
non cluster classes. This command is really more of a debug tool
but should actually be useful for updating the unit tests as we
can now simply detect which commands do and don't exist, etc.
|
|
Implemented ZREMRANGEBYLEX in Redis and RedisCluster, and made the
zlexcount command generic, as it has the same semantics.
|
|
Implemented ZREVRANGEBYLEX for Redis and RedisCluster, and made
command construction a generic that can handle either.
|
|
Implemented ROLE and TIME commands in RedisCluster, as well as
updated the TIME command for Redis proper such that we use the
new calling convention.
Updated redis_read_variant_reply to take a context void* so it
conforms with the correct prototype.
|
|
Implemented ZLEXCOUNT for both Redis and RedisCluster.
Removed unused variable in INFO response processor
|
|
Implemented ZRANGEBYLEX for both Redis and RedisCluster
|
|
Implemented the WATCH command for RedisCluster. This command can
take any number of keys, so phpredis splits the request across the
cluster in the best way it can.
For every key in a multiple key command, Redis Cluster requires
that they all hash to the same SLOT, else it will return a
CROSSLOT error and fail.
For WATCH in RedisCluster, a few things to note:
* The command will fail if phpredis is out of sync with the keyspace.
This is because we'll need to know where to deliver each command,
or can't possibly deliver them correctlhy.
* The command will fail if any command delivery failures occur on any
node. This is the case either for a normal communication error or
if RedisCluster returns to us MOVED/ASK redirection.
|
|
Moved our ResultCallback define to the top (before function protos)
as well as moved PHP_REDIS_VERSION define to the very top of php_redis.h
|
|
Implemented ZRANGE and ZREVRANGE for both Redis and cluster.
We can't use generic command processing here as the return type
depends on the optional WITHSCORES bit.
In addition, switched the code around such that zReverseRange is
an alias of zRevRange because ZREVRANGE is the actual Redis
command name.
|
|
Each of the commands that take no arguments can be reworked
such that they use the new calling convention in Redis proper
Impelemnted BITPOS
Removed Redis::resetStat. This isn't a Redis method, but rather
an option on CONFIG, and it probably should be called that way.
|