[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/panel/replication ORCTask.java, 1.1.1.1, 1.2 ReplicationAgreement.java, 1.3, 1.4

Richard Allen Megginson rmeggins at fedoraproject.org
Mon Dec 15 21:04:16 UTC 2008


Author: rmeggins

Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17612/directoryconsole/src/com/netscape/admin/dirserv/panel/replication

Modified Files:
	ORCTask.java ReplicationAgreement.java 
Log Message:
Resolves: bug 179193
Bug Description: Replication UI most of the time don't return consumer initialization error
Reviewed by: nkinder (Thanks!)
Fix Description: Just added a 3 second sleep after telling the server to perform the consumer init.  This seems to give the server time enough to attempt the init, fail, and set an appropriate error code.
Platforms tested: RHEL5
Flag Day: no
Doc impact: no



Index: ORCTask.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/ORCTask.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ORCTask.java	18 Jul 2005 00:56:08 -0000	1.1.1.1
+++ ORCTask.java	15 Dec 2008 21:04:13 -0000	1.2
@@ -67,6 +67,8 @@
 			/* send start replication request */
             m_agreement.updateEntry(mods);
 			
+            /* sleep for a moment to let status accrue */
+            Thread.sleep(3000);
 			/* The consumer initialization attribute was correctly added.
 			   We check until we have the first update result... */
 			m_firstUpdateStatus = 0;
@@ -112,6 +114,9 @@
             m_status = me.getLDAPResultCode();
 			m_firstUpdateMessage = me.getLDAPErrorMessage();
 			m_dlg.stop ();
+        } catch (InterruptedException e) {
+            Debug.println ("Sleep interrupted: Exception occured during ORC: " + e);
+            m_status = -1;
         }
 
 		m_dlg.stop ();


Index: ReplicationAgreement.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/ReplicationAgreement.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ReplicationAgreement.java	24 Nov 2008 16:09:23 -0000	1.3
+++ ReplicationAgreement.java	15 Dec 2008 21:04:13 -0000	1.4
@@ -1400,6 +1400,8 @@
 			return;
         }
 
+        Debug.println(9, "ReplicationAgreement.updateReplicaStatus: status " +
+                      "entry is " + entry.toString());
         String val = 
             DSUtil.getAttrValue(entry,
                                 ReplicationTool.REPLICA_LAST_UPDATE_STATUS_ATTR);




More information about the Fedora-directory-commits mailing list