Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6491

Add QueryConfig to specify state retention time for streaming queries


    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Implemented
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0, 1.4.0
    • Component/s: Table SQL / API
    • Labels:


      By now we have a couple of streaming operators (group-windows, over-windows, non-windowed aggregations) that require operator state. Since state is not automatically cleaned-up by Flink, we need to add a mechanism to configure a state retention time.

      If configured, a query will retain state for a specified period of state inactivity. If state is not accessed within this period of time, it will be cleared. I propose to add two parameters for this, a min and a max retention time. The min retention time specifies the earliest time and the max retention time the latest time when state is cleared. The reasoning for having two parameters is that we can avoid to register many timers if we have more freedom when to discard state.

      This issue also introduces a QueryConfig object which can be passed to a streaming query, when it is emitted to a TableSink or converted to a DataStream (append or retraction).


          Issue Links



              • Assignee:
                sunjincheng121 sunjincheng
                fhueske Fabian Hueske
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: