You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Murtadha Hubail (JIRA)" <ji...@apache.org> on 2015/09/29 21:40:04 UTC

[jira] [Commented] (ASTERIXDB-1002) Cannot remove index while it is open. [HyracksDataException]

    [ https://issues.apache.org/jira/browse/ASTERIXDB-1002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14935718#comment-14935718 ] 

Murtadha Hubail commented on ASTERIXDB-1002:
--------------------------------------------

This issue is happening due to wrong exception handling in EmptyTupleSourceRuntimeFactory. When the wrong query is executed, it would open the index, then never close it when an exception is thrown while flushing a frame.

I fixed the exception handling. 
[~tillw] , [~buyingyi],
I would appreciate it for you could do the code review.

[~imaxon], please verify the issue is gone with the fix.

You can reproduce it following these steps:
1. Fix the file path and run the query:

drop dataverse TwitterData if exists;
create dataverse TwitterData;
use dataverse TwitterData;

create type CoordinatesType as open {
        coordinates: [double]
}

create type TweetMessageType as open {
	id: int64,
        coordinates: CoordinatesType
}

create type ProcessedTweetType as open {
	id: int64
}

create dataset TweetMessages(TweetMessageType)
primary key id;
use dataverse TwitterData;
load dataset TweetMessages using localfs
(("path"="127.0.0.1://[file path]/SampleOutput.json"),("format"="adm"));
drop dataset ProcessedTweetMessages if exists;
create dataset ProcessedTweetMessages(TweetMessageType)
primary key id;

insert into dataset ProcessedTweetMessages
(
	for $d in dataset TweetMessages
        let $c := create-point($d.coordinates.coordinates[0], $d.coordinates.coordinates[1])
	return 
        {"id": $d.id,
          "point": $c
        }
);

2) Run the statement:
use dataverse TwitterData;
drop dataset TweetMessages if exists;

> Cannot remove index while it is open. [HyracksDataException]
> ------------------------------------------------------------
>
>                 Key: ASTERIXDB-1002
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1002
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: AsterixDB, Storage, Transactions
>            Reporter: asterixdb-importer
>            Assignee: Murtadha Hubail
>            Priority: Critical
>         Attachments: TestADM.txt, TestCorrectQuery.txt, TestWrongQuery.txt
>
>
> Cannot remove index while it is open. [HyracksDataException]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)