Age | Commit message (Collapse) | Author |
|
|
|
This commit splits compression and serialization into two distinct parts
and adds some utility functions so the user can compress/uncompress
or pack/unpack data explicily.
See #1939
|
|
Add support for Redis 6 ACLs in the `Redis`, `RedisCluster`, and `RedisArray` classes.
On a related note, it adds a mechanism for users to customize how we generate persistent connection IDs such that they can be grouped in different ways depending on the specific use case required (e.g. it would allow connections to be grouped by username, or by user-defined persistent_id, or both).
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
This commit removes support for PHP 5 by getting rid of all of our Zend
compatibility layer methods, as well as any call checking against
PHP_MAJOR_VERSION or ZEND_MODULE_API_NO.
Unit tests are all passing for Redis, RedisCluster, and RedisArray but
this should still be considered a work in progress until more testing
can be done.
Addresses issue #1448
|
|
Streams API
|
|
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.
|
|
|
|
`hStrLen` command
|
|
|
|
Wrap create_cluster_context
|
|
Wrap zend_register_internal_class_ex calls + redis-cluster GET_CONTEXT
|
|
Redefine `zend_hash_get_current_data` macro as static inline function +
add `zend_hash_get_current_data_ptr` function
|
|
|
|
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
|
|
We may want to configure phpredis such that it will attempt to fall back
to a given master's slave, if the master were to go down (and the command
is read only).
|
|
"last redirection" introspection method.
|
|
For certain commands that need to be directed at a node
(CONFIG, CLIENT, SCRIPT, etc), the syntax can be complicated
and highly variant. For this reason, these remaining commands
have been implemented in a generic way, where users will rely
on the error message from Redis to figure out what went wrong.
All of the commands take our standardized "node" argument which
can either take the form of a string key, or Array(host, port).
|
|
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 the ECHO command for cluster, which like other commands
where you send to a specific node, can be done either by sending
"at" a key, or by sending to a host/port
|
|
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 PING for RedisCluster
|
|
Implemented RANDOMKEY command for Redis Cluster
|
|
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 LINDEX command in RedisCluster
|
|
Implemented ZLEXCOUNT for both Redis and RedisCluster.
Removed unused variable in INFO response processor
|
|
Implemented ZRANGEBYLEX for both Redis and RedisCluster
|
|
This commit implements the INFO command for RedisCluster, which
behaves like other direct to node commands and can take either
a key or a host and port.
Updated cluster_send_slot function such that on success it sets
the proper reply slot.
|
|
Fixed a couple of compiler warnings
|
|
Added a helper method RedisCluster::_masters to get every master
that phpredis knows about, for the purposes of things like
scanning across the whole keyspace
|
|
Implemented EVAL and EVALSHA commands for cluster. Thes commands
present a bit of an issue from the context of a client. Given that
the code being executed can be any arbitrary LUA code, phpredis can't
always protect against trying to access keys that live on a different
cluster node, especially if the "keys count" isn't passed correctly,
or in cases where the keys are generated in the script.
Work in progress, but there is unlikely a perfect solution to this
at all, given the nature of Redis Cluster and LUA execution.
|
|
Implemented HSCAN, SSCAN, and ZSCAN for cluster
|
|
For commands like SAVE, BGSAVE, etc we need to change the
semantics from how you would call them directly, given that
we're communicating with multiple redis cluster nodes.
Each of these commands can be called in one of two ways.
1) Pass a single argument, which will be treated as a key,
and the command will be executed against the node where
we believe that key would live.
2) Pass a host and port, and as long as we know about this node
the command will be forwarded there.
|
|
Minor formatting changes
Updated how we delete context variables, such that our context
pointers aren't always going to be a zval** array. This
introduces the possibility of creating a memory leak if we have
to abort a transaction due to a communications error, but this
can be handled later by attaching a void dtor(void*) callback.
|
|
Modified our MSET handler and made it generic (it has the same
general mechanism as DEL, just with a different return type)
and implemented the DEL command.
We've got the same consideration to make. What to do in the
event of a catastrophic failure.
|
|
|
|
Implemented the two unsubscribe commands in Redis Cluster.
Presently, like with the standard Redis class once you subscribe
you're there for good, but it would be nice to be able to use the
callback return value to break out of the subscribe loop.
|