abdullah alamoudi has posted comments on this change.

Change subject: ASTERIXDB-1883: FeedRuntimeInputHandler issues
......................................................................


Patch Set 1:

(2 comments)

https://asterix-gerrit.ics.uci.edu/#/c/1677/1/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/dataflow/FeedRuntimeInputHandler.java
File 
asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/feed/dataflow/FeedRuntimeInputHandler.java:

PS1, Line 96: synchronized (writer) {
no need to sync


PS1, Line 104: synchronized (writer) {
bug. how about add a new static flag FAIL?

and then:

ByteBuffer buffer = inbox.poll();
        while (buffer != null) {
            if (buffer != SPILLED) {
                framePool.release(buffer);
            }
            buffer = inbox.poll();
        }
        try {
            inbox.put(FAIL);
        } catch (InterruptedException e) {
            LOGGER.log(Level.WARNING, "interrupted", e);
            Thread.currentThread().interrupt();
        }

and then in the consumer thread add one more else if
else if (frame == FAIL) {
                        running = false;
                        writer.fail();
                    }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7e091f65eb5f3a76277803b3197d490d3ef2fc04
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Xikui Wang <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>
Gerrit-HasComments: Yes

Reply via email to