[
https://issues.apache.org/jira/browse/ASTERIXDB-2329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16399539#comment-16399539
]
ASF subversion and git services commented on ASTERIXDB-2329:
------------------------------------------------------------
Commit d6d42c8616454733bcfbe8fb44856fc71992669a in asterixdb's branch
refs/heads/master from [~mhubail]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=d6d42c8 ]
[ASTERIXDB-2329][MTD] Remove Invalid Find Dataset
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Remove invalid findDataset from MetadataManager.
- Add test case for dropping and recreating a dataverse
with indexes and data.
Change-Id: I59b084c85279d926aa60fb7bfcd1a9f6e5935f2a
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2482
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Contrib: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Luo Chen <[email protected]>
Reviewed-by: Michael Blow <[email protected]>
> Drop Dataverse Throws Resource Not Exists Exception
> ---------------------------------------------------
>
> Key: ASTERIXDB-2329
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2329
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: MTD - Metadata
> Reporter: Chen Luo
> Assignee: Murtadha Hubail
> Priority: Critical
>
> Previously I constantly encounter ResourceNotExistException when dropping
> dataverse. After some digging, I found the problem is caused as follows:
> 1. Start a fresh AsterixDB, and create dataverse/dataset.
> {code}
> drop dataverse test if exists;
> create dataverse test;
> use test;
> create type testType as{id:int};
> create dataset testDS(testType) primary key id;
> create primary index primaryIdx on testDS;
> {code}
> 2. Insert a record.
> {code}
> use test;
> insert into testDS{"id":1};
> {code}
> 3. Shutdown AsterixDB.
> 4. Re-start AsterixDB.
> 5. Drop and recreate the same dataverse.
> {code}
> drop dataverse test if exists;
> create dataverse test;
> use test;
> create type testType as{id:int};
> create dataset testDS(testType) primary key id;
> create primary index primaryIdx on testDS;
> {code}
> Now we can get an exception:
> {code}
> org.apache.hyracks.api.exceptions.HyracksDataException: HYR0055: Resource
> does not exist for storage/partition_1/test/testDS/0/testDS
> at
> org.apache.hyracks.api.exceptions.HyracksDataException.create(HyracksDataException.java:55)
> ~[classes/:?]
> at
> org.apache.asterix.transaction.management.resource.PersistentLocalResourceRepository.delete(PersistentLocalResourceRepository.java:210)
> ~[classes/:?]
> at
> org.apache.hyracks.storage.am.common.build.IndexBuilder.build(IndexBuilder.java:78)
> ~[classes/:?]
> at
> org.apache.hyracks.storage.am.common.dataflow.IndexCreateOperatorNodePushable.initialize(IndexCreateOperatorNodePushable.java:52)
> ~[classes/:?]
> at
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.lambda$runInParallel$0(SuperActivityOperatorNodePushable.java:204)
> ~[classes/:?]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> ~[?:1.8.0_121]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [?:1.8.0_121]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [?:1.8.0_121]
> at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
> {code}
> The root cause seems to be that drop dataverse in step 5 is not executed
> properly. It suppose to drop all datasets, all indexes associated with the
> dataverse. However, line 1253 of QueryTranslator returns empty index list
> (MetadataManager.getDatasetIndexes returns at line 292 because the dataset
> does not exist in cache), which causes indexes are not dropped properly.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)