relative weight based load distribution, issue #1649
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #1649
#### Description
synchronization problem in dispatcher relative weight based distribution
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1650
-- Commit Summary --
* dispatcher: fix syncronization problem with
-- File Changes --
M src/modules/dispatcher/dispatch.c (30)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1650.patchhttps://github.com/kamailio/kamailio/pull/1650.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1650
Module: kamailio
Branch: master
Commit: c8daa313031a9560670f829c4bdd482058f3d303
URL: https://github.com/kamailio/kamailio/commit/c8daa313031a9560670f829c4bdd482…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2018-09-25T09:01:59+02:00
modules: readme files regenerated - ndb_redis ... [skip ci]
---
Modified: src/modules/ndb_redis/README
---
Diff: https://github.com/kamailio/kamailio/commit/c8daa313031a9560670f829c4bdd482…
Patch: https://github.com/kamailio/kamailio/commit/c8daa313031a9560670f829c4bdd482…
---
diff --git a/src/modules/ndb_redis/README b/src/modules/ndb_redis/README
index 90f51516e6..2ca2c52c58 100644
--- a/src/modules/ndb_redis/README
+++ b/src/modules/ndb_redis/README
@@ -355,6 +355,10 @@ modparam("ndb_redis", "allow_dynamic_nodes", 1)
The first value[n] references the element in the first array, while the
next key references an element of the referenced array.
+ The result type can be compared with $redisd(key) variable to test its
+ value. The key can be: rpl_str, rpl_arr, rpl_int, rpl_err, rpl_sts,
+ rpl_nil.
+
Example 1.10. redis_cmd usage
...
if(redis_cmd("srvN", "INCR cnt", "r")) {
Module: kamailio
Branch: master
Commit: 4b5ad86748a4f53ec1ca3d0043984cfdcef0ae75
URL: https://github.com/kamailio/kamailio/commit/4b5ad86748a4f53ec1ca3d0043984cf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-09-25T08:47:08+02:00
ndb_redis: note about $redisd(key) variable
---
Modified: src/modules/ndb_redis/doc/ndb_redis_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/4b5ad86748a4f53ec1ca3d0043984cf…
Patch: https://github.com/kamailio/kamailio/commit/4b5ad86748a4f53ec1ca3d0043984cf…
---
diff --git a/src/modules/ndb_redis/doc/ndb_redis_admin.xml b/src/modules/ndb_redis/doc/ndb_redis_admin.xml
index 8a4646cc39..e71ce806a1 100644
--- a/src/modules/ndb_redis/doc/ndb_redis_admin.xml
+++ b/src/modules/ndb_redis/doc/ndb_redis_admin.xml
@@ -362,6 +362,10 @@ modparam("ndb_redis", "allow_dynamic_nodes", 1)
the above keys, after a value[n] key. The first value[n] references the element in the
first array, while the next key references an element of the referenced array.
</para>
+ <para>
+ The result type can be compared with $redisd(key) variable to test
+ its value. The key can be: rpl_str, rpl_arr, rpl_int, rpl_err, rpl_sts, rpl_nil.
+ </para>
<example>
<title><function>redis_cmd</function> usage</title>
<programlisting format="linespecific">
@@ -413,23 +417,23 @@ if (redis_cmd("srvN", "EXEC", "r")) {
<function moreinfo="none">redis_pipe_cmd(srvname, command, ..., replyid)</function>
</title>
<para>
- Add a command to be sent to REDIS server identified by srvname.
- All the commands will be stored in a buffer until a call to
- redis_execute is made. When calling redis_execute the stored commands
+ Add a command to be sent to REDIS server identified by srvname.
+ All the commands will be stored in a buffer until a call to
+ redis_execute is made. When calling redis_execute the stored commands
are sent using the pipelining functionality of redis. The replies
- will be stored in local containers identified by the replyid of each
+ will be stored in local containers identified by the replyid of each
added command. All the parameters can be strings with pseudo-variables
that are evaluated at runtime.
</para>
<para>
- This command is similar in syntax with redis_cmd, the only difference
+ This command is similar in syntax with redis_cmd, the only difference
is that it does not send the command but instead appends it to a buffer.
</para>
<para>
See examples from redis_execute.
</para>
<para>
- Note: Pipelining feature is incompatible with the clustering feature.
+ Note: Pipelining feature is incompatible with the clustering feature.
If cluster parameter is set to 1, this function will log an error and do nothing.
</para>
</section>
@@ -438,20 +442,20 @@ if (redis_cmd("srvN", "EXEC", "r")) {
<function moreinfo="none">redis_execute(srvname)</function>
</title>
<para>
- Sends commands to REDIS server identified by srvname. Commands are added
+ Sends commands to REDIS server identified by srvname. Commands are added
with redis_pipe_cmd function, and will be stored for an existing REDIS server.
When this function is called all the commands will be sent in a single message
to the REDIS server.
</para>
<para>
- When using redis_cmd together with redis_pipe_cmd it is recommended that a call to
+ When using redis_cmd together with redis_pipe_cmd it is recommended that a call to
redis_execute is made before calling redis_cmd in case there are pipelined commands,
otherwise when calling redis_cmd, if pipelined messages exist, a call to redis_execute
- is made automatically and a warning message is logged.
+ is made automatically and a warning message is logged.
</para>
<para>
- Note: Pipelining feature is incompatible with the clustering feature.
+ Note: Pipelining feature is incompatible with the clustering feature.
If cluster parameter is set to 1, this function will log an error and do nothing.
</para>
<example>
@@ -475,7 +479,7 @@ Using both redis_cmd and redis_pipe_cmd:
redis_pipe_cmd("srvA", "SET ruri $ru", "r2");
- redis_execute("srvA"); //send commands to srvA and wait for reply. Store replies in r1 and r2
+ redis_execute("srvA"); //send commands to srvA and wait for reply. Store replies in r1 and r2
redis_cmd("srvA", "GET foo", "r3"); //send command, wait for reply and store it in r3