Young-Seok Kim has posted comments on this change.

Change subject: ASTERIXDB-1144 Ensure close of a feed store node completes
......................................................................


Patch Set 1:

I think there is still possibility of waiter's missing the notification. 

Please have a look the following changes in my local branch regarding the issue:
https://github.com/kisskys/incubator-asterixdb/commit/a29bf74092931ff8f4a152dcd209ba686428c6e5

Also, the following shows only the relevant classes changed regarding feeds:
...metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetaComputeNodePushable.java
 @@ -183,7 +183,12 @@ public void close() throws HyracksDataException {
                     inputSideHandler.nextFrame(null); // signal end of data
                     while (!inputSideHandler.isFinished()) {
                         synchronized (coreOperator) {
-                            coreOperator.wait();
+                            if (inputSideHandler.isFinished()) break;
+                            try { 
+                                coreOperator.wait();
+                            } catch (InterruptedException e) {
+                                //ignore
+                            }
                         }
                     }
                 } else {
View 7  
...x-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetaStoreNodePushable.java
 @@ -192,7 +192,12 @@ public void close() throws HyracksDataException {
                 inputSideHandler.nextFrame(null); // signal end of data
                 while (!inputSideHandler.isFinished()) {
                     synchronized (coreOperator) {
-                        coreOperator.wait();
+                        if (inputSideHandler.isFinished()) break;
+                        try { 
+                            coreOperator.wait();
+                        } catch (InterruptedException e) {
+                            //ignore
+                        }
                     }
                 }
                 System.out.println("ABOUT TO CLOSE OPERATOR  " + coreOperator);

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/528
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If36c9bd6a8ce794ca8e7eb796e2b8fe5b0e9e948
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Young-Seok Kim <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: No

Reply via email to