You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/03/18 03:58:00 UTC

[jira] [Updated] (ARROW-15968) [C++] Update AsyncGenerator semantics to emit a terminal item only after all outstanding futures have completed

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

ASF GitHub Bot updated ARROW-15968:
-----------------------------------
    Labels: pull-request-available  (was: )

> [C++] Update AsyncGenerator semantics to emit a terminal item only after all outstanding futures have completed
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: ARROW-15968
>                 URL: https://issues.apache.org/jira/browse/ARROW-15968
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Weston Pace
>            Assignee: Weston Pace
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently, when an error occurs, we emit the error immediately.  Once an error is emitted from the generator we typically discard it and all related state.  Unfortunately, in readahead situations, there may be outstanding tasks, and these may be referencing that related state.
> Currently, we avoid errors in this situation through the copious use of shared_ptr.  This has led to excess complexity and potential performance issues.
> Instead, we can update the rules for async generators to only emit a terminal item once all outstanding tasks have completed.  At this point we should be able to safely tear down all of the state.  Furthermore, if we can ensure consumers drain an async generator before they destroy it (this can be done in a follow-up issue), we can get rid of a lot of our shared_ptr and simplify some of the complexity of the async reader code.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)