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

Ritik Raj resolved ASTERIXDB-3491.
----------------------------------
    Resolution: Fixed

> Failure to Reset numTupleCount When ColumnFilter Skips Megapage Causes 
> Assembler to Enter Invalid State
> -------------------------------------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-3491
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-3491
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: STO - Storage
>    Affects Versions: 0.9.9
>            Reporter: Ritik Raj
>            Assignee: Ritik Raj
>            Priority: Major
>              Labels: triaged
>             Fix For: 0.9.9
>
>
> We have {{RangeFilter}} and {{{}ColumnFilters{}}}, where {{RangeFilter}} 
> checks if the Megapage contains column entries within the required range. If 
> the entries fall within this range, {{ColumnFilters}} then verifies whether 
> the columns meet the specified push-down filters.
> However, consider the following scenario:
>  # The {{RangeFilter}} determines that a column has values within the 
> requested range and sets {{numTupleCount}} to the total number of entries in 
> the Megapage.
>  # When the {{ColumnFilter}} subsequently iterates over these values, none of 
> them satisfy the filtering conditions, leading to the decision to skip the 
> entire Megapage.
>  # Despite this, since {{numTupleCount}} is already set to a non-zero value, 
> the assembler must skip the entries in the Megapage. This triggers the 
> following {{skip()}} method:
> {code:java}
> public int skip(int count) throws HyracksDataException {
>     if (numberOfTuples == 0 || count == 0) {
>         // Avoid advancing tupleIndex and numberOfSkips if a mega leaf node 
> is filtered out
>         return 0;
>     }
>     .......
>      for (int i = 0; i < assemblers.length; i++) {
>         assemblers[i].skip(count); // skips the entries ---- (1)
>     }
>     .......
> }{code}
>  # In this method, if numberOfTuples is greater than zero (as in this case), 
> it attempts to skip entries (marked as (1) in the code). However, because no 
> entries have been read, this results in an invalid state for the assembler, 
> causing it to fail.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to