-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
Issue found by the Keycloak test suite stability report here: https://docs.google.com/document/d/1GV-ZBY2naWgr_mOMTMYVTTmnd9grmT95FQZJNIqrAJk/edit?tab=t.0#heading=h.o4fd3gjhc3jw
Almost all failures are related to this.
The issue is difficult to reproduce outside the test suite since it happens when a view change event is handled between lines
channel.connect(clusterName); and receiveClusterView(channel.getView(), true);.
The test suite is updated with a test.
The fix is just moving viewUpdateLock.lock(); to the beginning of the method receiveClusterView() so the if conditions are checked only after the locking is acquired, preventing old views from being installed.