Author: rkanter
Date: Tue Jan 15 22:17:14 2013
New Revision: 1433701

URL: http://svn.apache.org/viewvc?rev=1433701&view=rev
Log:
OOZIE-1051 Repeating Errors for workflows that were allreday Killed (rkanter)

Modified:
    oozie/trunk/core/src/main/java/org/apache/oozie/command/XCommand.java
    oozie/trunk/core/src/test/java/org/apache/oozie/command/TestXCommand.java
    oozie/trunk/release-log.txt

Modified: oozie/trunk/core/src/main/java/org/apache/oozie/command/XCommand.java
URL: 
http://svn.apache.org/viewvc/oozie/trunk/core/src/main/java/org/apache/oozie/command/XCommand.java?rev=1433701&r1=1433700&r2=1433701&view=diff
==============================================================================
--- oozie/trunk/core/src/main/java/org/apache/oozie/command/XCommand.java 
(original)
+++ oozie/trunk/core/src/main/java/org/apache/oozie/command/XCommand.java Tue 
Jan 15 22:17:14 2013
@@ -291,7 +291,7 @@ public abstract class XCommand<T> implem
                 return ret;
             }
             finally {
-                if (isLockRequired()) {
+                if (isLockRequired() && !this.inInterruptMode()) {
                     releaseLock();
                 }
             }

Modified: 
oozie/trunk/core/src/test/java/org/apache/oozie/command/TestXCommand.java
URL: 
http://svn.apache.org/viewvc/oozie/trunk/core/src/test/java/org/apache/oozie/command/TestXCommand.java?rev=1433701&r1=1433700&r2=1433701&view=diff
==============================================================================
--- oozie/trunk/core/src/test/java/org/apache/oozie/command/TestXCommand.java 
(original)
+++ oozie/trunk/core/src/test/java/org/apache/oozie/command/TestXCommand.java 
Tue Jan 15 22:17:14 2013
@@ -135,6 +135,14 @@ public class TestXCommand extends XTestC
             execute = true;
             return null;
         }
+
+        private void resetCalledMethods() {
+            eagerLoadState = false;
+            eagerVerifyPrecondition = false;
+            loadState = false;
+            verifyPrecondition = false;
+            execute = false;
+        }
     }
 
     public void testXCommandGetters() throws Exception {
@@ -203,6 +211,18 @@ public class TestXCommand extends XTestC
         }
     }
 
+    public void testXCommandPossibleReleaseLockWithoutAcquireEdgeCase()
+            throws Exception {
+        AXCommand command = new AXCommand(true);
+        command.setInterruptMode(false);
+        command.call();
+        assertTrue(command.execute);
+        command.resetCalledMethods();
+        command.setInterruptMode(true);
+        command.call();
+        assertTrue(command.execute);
+    }
+
     private static class LockGetter extends Thread {
 
         @Override

Modified: oozie/trunk/release-log.txt
URL: 
http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1433701&r1=1433700&r2=1433701&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Tue Jan 15 22:17:14 2013
@@ -1,5 +1,6 @@
 -- Oozie 3.4.0 release (trunk - unreleased)
 
+OOZIE-1051 Repeating Errors for workflows that were allreday Killed (rkanter)
 OOZIE-1140 TestLogStreamer.testStreamLog fails when its started within the 
first 4 seconds after the hour (rkanter)
 OOZIE-1153 comma separated list in <archive> and <file> for 
JavaActionExecutor. (jaoki via tucu)
 OOZIE-1161 Remove unnecessary db updates for some of the blobs like 
missing_dependencies' of Coordinator Action (virag)


Reply via email to