879 Commits

Author SHA1 Message Date
michael-grunder
19e6f315f2 Merge branch 'release/2.2.4' 2.2.4 2013-09-01 18:39:08 -07:00
michael-grunder
8ed1a29ad3 Merge branch 'develop' of github.com:nicolasff/phpredis into develop 2013-09-01 13:25:15 -07:00
michael-grunder
02bac74dc3 Initialize agg_op_len to zero 2013-09-01 13:24:48 -07:00
Nicolas Favre-Felix
f4960ddec2 Release version 2.2.4 2013-09-01 20:24:09 +01:00
michael-grunder
3923531eba Merge branch 'feature/z_cmd_performance' into develop 2013-09-01 09:38:20 -07:00
michael-grunder
5c4fe08b69 generic_z_command fixes
Use the lengths for our optional parameters, as NULL will
come through as a non null zval pointer with a zero length

Properly return the length from the redis_cmd_sstr_init function
2013-09-01 09:33:20 -07:00
michael-grunder
6e0f0d786c Rework generic_z_command to build the command in linear time
This commit changes how we build the Redis protocol string for
ZUNIONSTORE and ZINTERSTORE such that we avoid reallocating
memory for the command buffer for each new key or weight
2013-09-01 07:48:08 -07:00
michael-grunder
eb0bbbafa0 Rollback the automatic resharding distributor
I accidentally pulled this when getting some of the pull requests
integrated (git flow style) for this release.  I like the idea
for sure, but I think it needs more detailed documentation and
further testing.

At the very least, I need to understand it :)
2013-08-31 19:20:34 -07:00
michael-grunder
f5fc23cbe2 Merge branch 'hotfix/double_precision' into develop 2013-08-31 14:12:56 -07:00
michael-grunder
4c24dfa5c5 Merge branch 'hotfix/double_precision' double_precision 2013-08-31 14:12:36 -07:00
michael-grunder
20a3ef42d8 Merge branch 'feature/mobli_ra_changes' into develop 2013-08-31 14:12:13 -07:00
michael-grunder
60e3ba781e Merge branch 'feature/new_set_args' into develop 2013-08-31 14:09:58 -07:00
michael-grunder
8e81c49b55 Performance increase for MGET
This commit changes the way we construct the MGET command
such that we avoid allocating and reallocating the command
string pointer for every new key that is added.

This means that MGET performance scales in a linear way rather
than exponentially.
2013-08-31 11:27:54 -07:00
michael-grunder
b3a64145cb Merge branch 'feature/matmol_connect_ex' into develop 2013-08-30 21:30:59 -07:00
michael-grunder
77b17e52ea Merge in MatMol's changes so we don't throw and then clear an
exception in the context of connect or pconnect

Addresses #361
2013-08-30 21:30:00 -07:00
michael-grunder
677c8df7c1 Merge remote-tracking branch 'matmol/dont_throw_exception_on_pconnect' into feature/matmol_connect_ex 2013-08-30 21:18:00 -07:00
michael-grunder
bab2a192b7 Fix an erroneous unit test failure for TTL
When using the TTL command, Redis >= 2.8 will return -1 for a key
with no TTL and -2 for a key that doesn't exist.  This fixes the
unit tests so they don't expect this in versions < 2.8.
2013-08-30 21:11:02 -07:00
michael-grunder
7207aae8aa Add SLOWLOG command
Add support for the various slowlog commands you can execute
in Redis, including:

SLOWLOG GET [len]
SLOWLOG RESET
SLOWLOG LIST
2013-08-27 21:26:51 -07:00
michael-grunder
6cf2cea4f6 Merge branch 'feature/reflection_flags' into develop 2013-08-23 11:09:54 -07:00
michael-grunder
d1eddc4b87 Incorporate reflection flags from euskadi31
References #344

Merge remote-tracking branch 'euskadi31/patch-1' into feature/reflection_flags
2013-08-23 11:07:53 -07:00
michael-grunder
535ff5d13f Actually set the precision to 16 places!
Addresses #371
2013-08-15 10:54:41 -07:00
michael-grunder
daef4b73a0 Increase double->string precision
When calling php library methods to convert doubles to strings
we were only keeping 8 digits after the decimal point.  For
double precision numbers, 15 are stable.

Redis uses the C library function strtod() to do the conversion,
which appears to use the first 16 digits for aproximation:
http://www.exploringbinary.com/how-strtod-works-and-sometimes-doesnt/

This hotfix increases the signifigant digits to 16, which I think
is the correct number to pick here.

Addresses issue #371
2013-08-15 10:47:03 -07:00
michael-grunder
c501638696 Merge branch 'feature/zintersection_optional' into develop 2013-08-14 20:20:44 -07:00
michael-grunder
7c9420dcca Merge remote-tracking branch 'mheijkoop/zintersection_optional' into feature/zintersection_optional 2013-08-14 20:18:30 -07:00
Marlies Heijkoop
68605de48c Allow weights array to be null in generic_z_command (zUnion/zInter)
This way we can pass an aggregate function without having to also pass a dummy array(1,1,1..) with weights.
2013-08-12 21:37:16 +02:00
Marlies Heijkoop
d01abbbd7d Added tests for zUnion and zInter with aggregate functions but without weights 2013-08-12 21:36:13 +02:00
michael-grunder
7aae259ecb Fix argument order sent to ra_make_array 2013-08-11 11:50:38 -07:00
michael-grunder
f97c8433d5 Integrating mobli's lazy connect and retry interval 2013-08-11 11:31:23 -07:00
michael-grunder
8443769dc3 Merge remote-tracking branch 'mobli/develop' into feature/mobli_ra_changes
Conflicts:
	redis_array.c
	redis_array_impl.c
	redis_array_impl.h
2013-08-11 11:29:29 -07:00
michael-grunder
a80246122a Merge branch 'feature/ra_mset_intkeys' into develop 2013-08-11 09:13:04 -07:00
michael-grunder
ee571eabdf Merge branch 'feature/ra-performance' into develop 2013-08-11 09:05:37 -07:00
michael-grunder
16185f2e37 Re-add UNIX socket support to RedisArray
Merging the logic from ra-performance branch into feature/ra-performance
2013-08-11 09:01:49 -07:00
michael-grunder
dcbeae7599 Persistent connections with RedisArray
Re-integrating the now old ra-performance branch into a git-flow
branch.  I could have merged it but this was easier with so few
changes
2013-08-11 08:54:59 -07:00
michael-grunder
2099f1904a Merge branch 'hotfix/ra_mget_segfault' into develop 2013-08-06 14:19:37 -07:00
michael-grunder
cdd437ec59 Merge branch 'hotfix/ra_mget_segfault' ra_mget_segfault 2013-08-06 14:19:23 -07:00
michael-grunder
641841012f Make sure RedisArray::mget returns an array
Add a check in mget to make sure that the forwarded call is
returning with an array, and not NULL or something else.

Addresses issue #350
2013-08-06 14:17:54 -07:00
michael-grunder
711f053b9f Redis >= 2.6.12 extended set options
Implement the new SET options as per the redis documentation:
http://redis.io/commands/set

You can now pass the new options (ex=>sec, px=>milisec, xx, nx) as
an array of options to the SET command and phpredis will handle them.

If you pass key, value, <long> phpredis will still redirect to SETEX
as it did before (to avoid breaking implementations).

Addresses #364
2013-08-02 23:31:27 -07:00
michael-grunder
98bc9ecbeb Formatting 2013-07-31 21:50:00 -07:00
michael-grunder
0ce690c8fe Allow for LONG and STRING keys in MGET and MSET. We can't allow
for other types, as phpredis proper takes a key->value array and
PHP doesn't support other array key types.

Addresses #360
2013-07-31 21:20:22 -07:00
michael-grunder
58f38ae728 Merge branch 'hotfix/ttl_return' into develop 2013-07-31 14:58:16 -07:00
michael-grunder
1a8b049d4f Merge branch 'hotfix/ttl_return' ttl_return 2013-07-31 14:58:01 -07:00
michael-grunder
1b624141c0 Update documentation and unit tests for TTL/PTTL
Addresses #358
2013-07-31 14:57:26 -07:00
Mathieu Kooiman
7e4cdb47f4 Don't throw exceptions for (p)connect calls.
When Redis::(p)connect() is called on a newly created Redis instance that will always cause an exception to be thrown. The connect code will actually try and cancel the
exception but this is problematic when you are using tools like APM (pecl.php.net/apm) which hook into the exception handler: it will already have handled it. This change simply stops the connect from throwing exceptions for that situation.
2013-07-29 14:00:36 +02:00
Emmanuel Merali
0ff393bdca Fix poor performance on initial use
Fix poor performance on initial use of easy reshard distributor
mechanism.
2013-07-22 05:29:35 +03:00
Emmanuel Merali
958e062800 Changed distributor to accepts strings
Changed distributor to accept strings as well as longs so that
definitions parsed from parse_ini_files may be used as is
2013-07-22 04:50:11 +03:00
michael-grunder
586d826c4d Merge branch 'hotfix/echo_alias' into develop 2013-06-24 11:57:38 -07:00
michael-grunder
de139e83de Merge branch 'hotfix/echo_alias' echo_alias 2013-06-24 11:57:28 -07:00
michael-grunder
e47e18c4b2 Create an alias for echo, called sendEcho
Addresses #345
2013-06-24 11:56:38 -07:00
Axel Etcheverry
e74e98e0d7 Add ZEND_ACC_CTOR and ZEND_ACC_DTOR for Reflection 2013-06-24 15:59:29 +02:00
Emmanuel Merali
2f795ed0b4 FIx C99 compliance
FIx C99 compliance
2013-05-26 01:25:27 +03:00