Skip to content

Wait for Tribes receiver startup#1023

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:receiver-startup-barrier
Open

Wait for Tribes receiver startup#1023
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:receiver-startup-barrier

Conversation

@fallintoplace

Copy link
Copy Markdown

What changed

  • Added a receiver start-up readiness hook to ChannelReceiver.
  • Made ChannelCoordinator wait for receiver readiness before reading or mutating the local member.
  • Signalled readiness from NioReceiver after the listener thread has entered listen mode and registered UDP reads when configured.
  • Added a regression test for the coordinator start-up ordering.

Why

ChannelCoordinator starts the data receiver before copying receiver host/port details into the local member. For asynchronous receivers, start() can return before the receiver thread has finished its own start-up, leaving a small window where local-member state can be read or mutated too early.

Testing

  • PATH=/opt/homebrew/opt/ant/bin:/opt/homebrew/Cellar/openjdk@17/17.0.19/bin:$PATH ant -Dtest.entry=org.apache.catalina.tribes.group.TestGroupChannelStartStop test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant