Hi,

I'm currently using EVS messaging to propagate events across a cluster, and I
was hoping that switching to CPG would help minimise some IPC disconnect issues
I've been having. However, I'm not sure I fully understand how CPG flow control
works.

My test is: I've got 2 nodes in a cluster, node-1 is sending CPG messages
faster than node-2 can process them (due to a usleep), and node-2 is not sending
any messages. I can see flow control kick in and node-1 stops sending messages,
i.e. by using the demo code:
cpg_flow_control_state_get(handle, &flow_control);
if (flow_control == CPG_FLOW_CONTROL_DISABLED)
    cpg_mcast_joined (handle, CPG_TYPE_AGREED, &iov, 1);

Once node-2 recovers, I see that flow control gets disabled again in aisexec.
However, the app on node-1 doesn't seem to detect flow control is disabled
again. It looks like the cpg_inst->flow_control_status returned by
cpg_flow_control_state_get() gets updated during a DELIVER_CALLBACK in
cpg_dispatch(), or in cpg_mcast_joined(). But if the app is not sending
messages (because flow control is enabled), and it has already dispatched all
its received messages, how would the app/library know when the flow control
becomes disabled again?

The app I'm using is multi-threaded, e.g. one thread generates events
(cpg_mcast_joined), another thread processes them (cpg_dispatch). I'm using
AIS trunk code from around August 07, but I can't see any major CPG changes in
the latest trunk code.

Sorry if I've completely misunderstood CPG. Thanks for your help,

Tim
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to