State access in RichAsyncFunction

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

State access in RichAsyncFunction

shimin yang
Hi all,

Regarding to the RichAsyncFunction, why we cannot access the state through
runtime context like other operators?

Best,
Shimin Yang
Reply | Threaded
Open this post in threaded view
|

Re: State access in RichAsyncFunction

Till Rohrmann
The problem is that `RichAsyncFunction` is allowed to trigger an
asynchronous operation which can keep a reference to the `RuntimeContext`.
However, it is not guaranteed when this operation is actually executed. Due
to this, the underlying key could have changed, thus, accessing state which
can belong to another key. One would have to reset the corresponding key
before accessing the state. But this is not yet happening.

Cheers,
Till

On Fri, Oct 19, 2018 at 8:37 AM shimin yang <[hidden email]> wrote:

> Hi all,
>
> Regarding to the RichAsyncFunction, why we cannot access the state through
> runtime context like other operators?
>
> Best,
> Shimin Yang
>
Reply | Threaded
Open this post in threaded view
|

Re: State access in RichAsyncFunction

shimin yang
Thanks, Till.

Best
Shimin

Till Rohrmann <[hidden email]> 于2018年10月19日周五 下午4:22写道:

> The problem is that `RichAsyncFunction` is allowed to trigger an
> asynchronous operation which can keep a reference to the `RuntimeContext`.
> However, it is not guaranteed when this operation is actually executed. Due
> to this, the underlying key could have changed, thus, accessing state which
> can belong to another key. One would have to reset the corresponding key
> before accessing the state. But this is not yet happening.
>
> Cheers,
> Till
>
> On Fri, Oct 19, 2018 at 8:37 AM shimin yang <[hidden email]> wrote:
>
> > Hi all,
> >
> > Regarding to the RichAsyncFunction, why we cannot access the state
> through
> > runtime context like other operators?
> >
> > Best,
> > Shimin Yang
> >
>