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

Yingyi Bu closed ASTERIXDB-1938.
--------------------------------
    Resolution: Fixed

> AppendOnlyLinkedMetadataPageManager.put() is called after close(). HYR0012 is 
> thrown
> ------------------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-1938
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1938
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Storage
>            Reporter: Dmitry Lychagin
>            Assignee: Chen Luo
>
> We're getting this exception:
> rg.apache.hyracks.api.exceptions.HyracksDataException: HYR0012: Invalid 
> attempt to write to a flushed append only metadata page
>       at 
> org.apache.hyracks.api.exceptions.HyracksDataException.create(HyracksDataException.java:49)
>       at 
> org.apache.hyracks.storage.am.common.freepage.AppendOnlyLinkedMetadataPageManager.put(AppendOnlyLinkedMetadataPageManager.java:311)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.DiskComponentMetadata.put(DiskComponentMetadata.java:38)
>       at 
> org.apache.asterix.common.ioopcallbacks.AbstractLSMIOOperationCallback.putLSNIntoMetadata(AbstractLSMIOOperationCallback.java:105)
>       at 
> org.apache.asterix.common.ioopcallbacks.AbstractLSMIOOperationCallback.afterOperation(AbstractLSMIOOperationCallback.java:188)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.LSMHarness.flush(LSMHarness.java:503)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.LSMTreeIndexAccessor.flush(LSMTreeIndexAccessor.java:121)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.FlushOperation.call(FlushOperation.java:42)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.FlushOperation.call(FlushOperation.java:30)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       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)
> However at that time the AppendOnlyLinkedMetadataPageManager is already 
> closed.
> The stack trace for the close() method invocation is the following:
> at 
> org.apache.hyracks.storage.am.common.freepage.AppendOnlyLinkedMetadataPageManager.close(AppendOnlyLinkedMetadataPageManager.java:216)
>       at 
> org.apache.hyracks.storage.am.common.impls.AbstractTreeIndex.deactivate(AbstractTreeIndex.java:163)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.AbstractLSMDiskComponentBulkLoader.cleanupArtifacts(AbstractLSMDiskComponentBulkLoader.java:170)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.AbstractLSMDiskComponentBulkLoader.end(AbstractLSMDiskComponentBulkLoader.java:158)
>       at 
> org.apache.hyracks.storage.am.lsm.btree.impls.LSMBTree.flush(LSMBTree.java:357)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.LSMHarness.flush(LSMHarness.java:502)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.LSMTreeIndexAccessor.flush(LSMTreeIndexAccessor.java:121)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.FlushOperation.call(FlushOperation.java:42)
>       at 
> org.apache.hyracks.storage.am.lsm.common.impls.FlushOperation.call(FlushOperation.java:30)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       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)
> So AppendOnlyLinkedMetadataPageManager.close() is called from LSMHarness:502 
> (flush), then the next line (LSMHarness:503) calls the callback which tries 
> to write data into the closed page manager. At that point its 
> 'confiscatedPage' is 'null'  and therefore HYR0012 is thrown



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to