Hi,

This should not happen. I guess the `onTimer` and `processElement` you are
testing are triggered under different keyby keys. Note that the keyed
states are partitioned by the keyby key first, so if querying or setting
the state, you are only manipulating the specific partition which does not
affect other partitions. Please check the partitioned keys (keyby key) are
the same under those two functions using `ctx.getCurrentKey()`. Hope
this helps.


Best,
Zakelly

On Thu, Dec 7, 2023 at 4:48 PM Jake.zhang <ft20...@qq.com> wrote:

> Hi all:
>
> KeyBy process function
>
> EventKeyedBroadcastProcessFunction {
>
>     private transient mapstate = null;
>
>     public void open(Configuration parameters) throws Exception {
>          // initial map state
>     }
>
>     public void processElement() {
>          // can't get onTimer() function set state key value
>    }
>
>    public void onTimer() {
>       // set map state  key value first
>    }
>
> }
>
> why processElement function can't get onTimer function sets  value ?
>
> thanks.
>
>

Reply via email to