lwhay / hyracks

Automatically exported from code.google.com/p/hyracks
Apache License 2.0
0 stars 1 forks source link

ResultStateSweeper thread does not stop after processing is finished #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. The ResultStateSweeper thread does not stop after the result has been 
created for VXQuery.    
2. Running the trunk version of VXQuery will show several threads still active 
and ResultStateSweeper is keeping them all alive.
3.

What is the expected output? What do you see instead?
The VXQuery CLI hangs because not all threads have finished and the issue is 
with ResultStateSweeper. Removing this thread allows the cli to finish and 
return control of the terminal.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by ecarm...@ucr.edu on 9 Jul 2013 at 7:54

GoogleCodeExporter commented 9 years ago

Original comment by westm...@gmail.com on 12 Jul 2013 at 4:19

GoogleCodeExporter commented 9 years ago
The attached patch show one way to stop the ResultStateSweeper for VXQuery. Its 
one suggested solution. One more familiar with the process may have other 
ideas. 
First time I have created a git patch. I hope this works for you.

Original comment by ecarm...@ucr.edu on 12 Jul 2013 at 8:36

Attachments:

GoogleCodeExporter commented 9 years ago
Found a simpler solution. Just change the thread to be a daemon thread.

diff --git 
a/hyracks/hyracks-control/hyracks-control-common/src/main/java/edu/uci/ics/hyrac
ks/control/common/application/ApplicationContext.java 
b/hyracks/hyracks-control/hyracks-control-common/src/main/java/edu/uci/ics/hyrac
ks/
index 2ca7ccf..828f2fb 100644
--- 
a/hyracks/hyracks-control/hyracks-control-common/src/main/java/edu/uci/ics/hyrac
ks/control/common/application/ApplicationContext.java
+++ 
b/hyracks/hyracks-control/hyracks-control-common/src/main/java/edu/uci/ics/hyrac
ks/control/common/application/ApplicationContext.java
@@ -31,7 +31,9 @@ public abstract class ApplicationContext implements 
IApplicationContext {
     protected IJobSerializerDeserializerContainer jobSerDeContainer = new JobSerializerDeserializerContainer();
     protected ThreadFactory threadFactory = new ThreadFactory() {
         public Thread newThread(Runnable r) {
-            return new Thread(r);
+            Thread t = new Thread(r);
+            t.setDaemon(true);
+            return t;
         }
     };

Original comment by ecarm...@ucr.edu on 27 Aug 2013 at 8:43

GoogleCodeExporter commented 9 years ago
Patch was committed a while back.

Original comment by ecarm...@ucr.edu on 5 Jun 2014 at 2:27