Understanding the BARRIER protocol

16 views
Skip to first unread message

Liviu Ioan

unread,
Jun 4, 2024, 7:07:26 AM6/4/24
to jgroups-dev
Hello,

We are using Jgroups 3.6.20.
We need some help in understanding if we really need to add BARRIER in our main jgroups config file.

Quote from the JGroups 3.x docs:
"BARRIER is used by some of the state transfer protocols, as it lets existing threads complete and blocks new threads to get both the digest and state in one go.
In 3.1, a new mechanism for state transfer will be implemented, eliminating the need for BARRIER. Until then, BARRIER should be used when one of the state transfer protocols is used. BARRIER is part of every default stack which contains a state transfer protocol."

Q1: When is the BARRIER protocol being used? Is the BARRIER protocol used internally by jgroups or should the custom "state transfer" code explicitly make use of the BARRIER protocol API?
Q2: Can we remove the BARRIER protocol from the main config file (because it is not being used anymore)?

Thank you.
Liviu

Bela Ban

unread,
Jun 5, 2024, 2:49:34 AM6/5/24
to jgrou...@googlegroups.com
If you use STATE_TRANSFER (JChannel.getState() API), then BARRIER should be in your config. If you don't, you can remove STATE_TRANSFER and BARRIER.
This also applies to STATE and STATE_SOCK.
--
You received this message because you are subscribed to the Google Groups "jgroups-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jgroups-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jgroups-dev/b5212dbb-0f82-46a8-9532-50801c5f7032n%40googlegroups.com.

-- 
Bela Ban | http://www.jgroups.org

Reply all
Reply to author
Forward
0 new messages