| 
		Notes	 | 
	
		 
	 | 
	
		
		
			| 
				(0122805)
			 | 
		 
		
			| 
				hgbot   
			 | 
		 
		
			| 
				2020-09-08 18:10   
							 | 
		 
		 
	 | 
	
		
	 | 
	
		 
	 | 
	
		
		
			| 
				(0122852)
			 | 
		 
		
			| 
				hgbot   
			 | 
		 
		
			| 
				2020-09-09 09:20   
							 | 
		 
		 
	 | 
	
		
	 | 
	
		 
	 | 
	
		
		
			| 
				(0122853)
			 | 
		 
		
			| 
				hgbot   
			 | 
		 
		
			| 
				2020-09-09 09:20   
							 | 
		 
		 
	 | 
	
		
		
			
				Directly closing issue as related merge request is already approved. 
 
Repository: https://gitlab.com/openbravo/product/openbravo [^] 
Changeset: 3f3600da371663ecc80dce4fa215a6138bd11e11 
Author: Carlos Aristu <carlos.aristu@openbravo.com> 
Date: 2020-09-09T09:20:11+02:00 
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/3f3600da371663ecc80dce4fa215a6138bd11e11 [^] 
 
fixes ISSUE-45005: can have two leader nodes at the same time 
 
   In case of having a database lock in the AD_CLUSTER_SERVICE table, 
the nodes of the HA clustered environment are not able to update 
properly the last ping information. This may cause that during a period 
of time several nodes of the claster to wrongly take the leadership. 
 
  The database lock causes the nodes to detect that the leader is no longer 
available and to try to register themselves as leaders which will not 
be possible while the table is locked. 
 
  Once the lock is resolved, the different updates from the nodes will 
be executed, causing a temporary wrong registration of one of the nodes as 
leader. 
 
  To avoid this wrong registration (update) in the table, we are going 
to take into account the last ping seeing by each node when updating the 
record. Thus, when the lock is resolved the leader update will be 
commited updating the last ping value. Then, the rest of nodes will not 
be able to update the record as the change in the last ping value will 
make their update where clause not be fullfiled. 
 
  Together with this change, we are removing some empty comments used to 
format and removing a no longer needed string concatenation for logging. 
 
--- 
M src/org/openbravo/cluster/ClusterServiceManager.java 
--- 
			 | 
		 
		 
	 |