db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oyste...@apache.org
Subject svn commit: r628078 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java
Date Fri, 15 Feb 2008 15:03:08 GMT
Author: oysteing
Date: Fri Feb 15 07:03:07 2008
New Revision: 628078

URL: http://svn.apache.org/viewvc?rev=628078&view=rev
Log:
DERBY-3406: Fix unsynchronized calls to notify
Contributed by V Narayanan

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java?rev=628078&r1=628077&r2=628078&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/services/replication/master/AsynchronousLogShipper.java
Fri Feb 15 07:03:07 2008
@@ -313,11 +313,11 @@
         
         fi = logBuffer.getFillInformation();
         
-        if (fi >= FI_HIGH) {
-            notify();
-        } else if ((System.currentTimeMillis() - lastShippingTime) > MIN) {
-            // Minimum MIN time between messages unless buffer is almost full
-            notify();
+        if (fi >= FI_HIGH || 
+                (System.currentTimeMillis() - lastShippingTime) > MIN) {
+            synchronized (this) {
+                notify();
+            }
         }
     }
     



Mime
View raw message