[ 
https://issues.apache.org/jira/browse/ASTERIXDB-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Murtadha Hubail resolved ASTERIXDB-1377.
----------------------------------------
    Resolution: Fixed

The issue was happening due to an exception that happens before the index 
search operation starts, which forces the operation to exit the components. 
After that, during the index scan operator close call, it tries to close the 
search cursor which tries to exit the components again, yielding to multiple 
exits and invalid reader count in the LSM component.

The current fix prevents an operation from entering LSM components twice or 
exiting multiple times.

> Invalid LSM disk component readerCount after a restart
> ------------------------------------------------------
>
>                 Key: ASTERIXDB-1377
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1377
>             Project: Apache AsterixDB
>          Issue Type: Bug
>            Reporter: Yingyi Bu
>            Assignee: Murtadha Hubail
>            Priority: Critical
>
> I shut down an instance while a read query is running.
> However, after restart, the dataset is no longer query-able with the 
> following exception trace.
> {noformat}
> org.apache.hyracks.api.exceptions.HyracksDataException: 
> java.util.concurrent.ExecutionException: 
> org.apache.hyracks.api.exceptions.HyracksDataException: 
> java.lang.IllegalStateException: Invalid LSM disk component readerCount: -3
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.runInParallel(SuperActivityOperatorNodePushable.java:218)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.initialize(SuperActivityOperatorNodePushable.java:83)
>       at org.apache.hyracks.control.nc.Task.run(Task.java:263)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at java.lang.Thread.run(Thread.java:745)
> Caused by: java.util.concurrent.ExecutionException: 
> org.apache.hyracks.api.exceptions.HyracksDataException: 
> java.lang.IllegalStateException: Invalid LSM disk component readerCount: -3
>       at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>       at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.runInParallel(SuperActivityOperatorNodePushable.java:212)
>       ... 5 more
> Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: 
> java.lang.IllegalStateException: Invalid LSM disk component readerCount: -3
>       at 
> org.apache.hyracks.storage.am.common.dataflow.IndexSearchOperatorNodePushable.close(IndexSearchOperatorNodePushable.java:210)
>       at 
> org.apache.hyracks.algebricks.runtime.operators.std.EmptyTupleSourceRuntimeFactory$1.close(EmptyTupleSourceRuntimeFactory.java:60)
>       at 
> org.apache.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperatorDescriptor$1.initialize(AlgebricksMetaOperatorDescriptor.java:116)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.lambda$initialize$0(SuperActivityOperatorNodePushable.java:83)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable$$Lambda$2/639188024.runAction(Unknown
>  Source)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable$1.call(SuperActivityOperatorNodePushable.java:205)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable$1.call(SuperActivityOperatorNodePushable.java:202)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       ... 3 more
> Caused by: java.lang.IllegalStateException: Invalid LSM disk component 
> readerCount: -3
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.AbstractDiskLSMComponent.threadExit(AbstractDiskLSMComponent.java:89)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.LSMHarness.exitComponents(LSMHarness.java:196)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.LSMHarness.endSearch(LSMHarness.java:373)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.LSMIndexSearchCursor.close(LSMIndexSearchCursor.java:151)
>       at 
> org.apache.hyracks.storage.am.lsm.btree.impls.LSMBTreeSearchCursor.close(LSMBTreeSearchCursor.java:97)
>       at 
> org.apache.hyracks.storage.am.common.dataflow.IndexSearchOperatorNodePushable.close(IndexSearchOperatorNodePushable.java:207)
>       ... 10 more
> {noformat}



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

Reply via email to