Added lazy_connect option to RedisArray#303
Conversation
Added the possibility to delay each reconnection attempt, including a random factor to prevent several or many concurrent connections from trying to reconnect at the same time. Added the select command to RedisArray to select a DB on every connections in one instruction.
Added the possibility to delay each reconnection attempt, including a random factor to prevent several or many concurrent connections from trying to reconnect at the same time. Added the select command to RedisArray to select a DB on every connections in one instruction. Also, fixed a compiler warning: redis_array_impl.c:1115:15: warning: incompatible pointer types assigning to 'zval **' (aka 'struct _zval_struct **') from 'zval **(*)[2]' [-Wincompatible-pointer-types]
…connect" This reverts commit 6091727.
This reverts commit 3fb6432.
Added the possibility to delay each reconnection attempt, including a random factor to prevent several or many concurrent connections from trying to reconnect at the same time. Added the select command to RedisArray to select a DB on every connections in one instruction. Also, fixed a compiler warning: redis_array_impl.c:1115:15: warning: incompatible pointer types assigning to 'zval **' (aka 'struct _zval_struct **') from 'zval **(*)[2]' [-Wincompatible-pointer-types]
Conflicts: common.h
Added an option to let each RedisArray connection connect lazily to their respective server. This is useful then working with a redis cluster composed of many shards which are not necessarily in use all at once.
Conflicts: library.c library.h redis.c redis_array.c redis_array_impl.c redis_array_impl.h redis_session.c
Added an option to let each RedisArray connection connect lazily to their respective server. This is useful then working with a redis cluster composed of many shards which are not necessarily in use all at once.
|
Also, the extension doesn't compile in the develop branch. I've compiled locally by making some changes to library.c, but I didn't want to commit them because I'm not sure what the intention is. For instance: I replaced with Also in I simply removed the lines Same for the remaining errors. |
|
Nice spot! Those are things that I broke :) I'll get them sorted for sure. I think we're using Redis in a similar way (tons of shards, all over the place). I thing an option to connect lazily is a good thing too. Cheers! |
|
Hi Michael (can I call you Mike? :-)) Thanks, Emmanuel |
|
Hey there, Yes, Michael, Mike, or "hey you" are all acceptable. :) I have merged the client reply fix into develop and hotfixed the zipped_with_reply issue. Cheers dude, |
|
Hi again, There are still 3 compilation errors of the same kind (non-void function 'bla-bla' should return a value) on lines 1096, 1143 and 1222. I don't really get the point of these, why not simply returning -1? Cheers, Emmanuel |
methods are int returns Resolves issues pertaining to #303
|
Hey dude, the reason that it's not simply returning -1 is that we're setting the return value for the PHP userland caller. If we're not in a pipeline we want PHP to return This looks to get all of them. Cheers, |
|
Aha! I get it! Thanks for the explanation, now it all makes sense! Have a good night now (if you ever sleep) and thanks a lot for the really fast turnaround! Take care, Emmanuel |
An integrated distributor for easy resharding. Works on the principle of redistributing keys from 1 shard to 2 shards evenly.
Updated documentation
Updated documentation
Updated documentation
FIx C99 compliance
Changed distributor to accept strings as well as longs so that definitions parsed from parse_ini_files may be used as is
Fix poor performance on initial use of easy reshard distributor mechanism.
|
Hey there, Sorry for such a long delay. I have merged and integrated your changes into the feature branch Cheers! |
Hi Michael,
So here we go, my first try after using git flow.
Here is the summary of the changes I'm proposing:
Added an option to let each RedisArray connection connect lazily to their respective server. This is useful then working with a redis cluster composed of many shards which are not necessarily in use all at once.
Cheers!
Emmanuel