tzulitai opened a new pull request #120:
URL: https://github.com/apache/flink-statefun/pull/120


   This PR is based on the refactoring work in #119, and completes the initial 
support for state TTL in remote functions. Only last 5 commits are relevant.
   
   Users define state TTL in their YAML modules like so:
   ```
   functions:
     - function:
        states:
          - name: xxxx
            expireAfter: 60000millisecond or 5sec / etc. # optional key
   ```
   
   The current implementation has some limitations due to how we are 
multiplexing remote function's user state in a single PersistedTable (see 
FLINK-17954):
   
   - The actual TTL being set will be the longest duration across all 
registered state
   - The only supported expiration mode now is `AFTER_READ_AND_WRITE`. That can 
be added as a `expireMode` key in the YAML spec in the future.
   
   ## Brief change log
   
   - 1dbfa07 to 199d3fd Introduces a `StateSpec` class which captures the state 
name and configured expiration timeout.
   - 435060f Updates the `FunctionJsonEntity` to recognize the new format (for 
version 2.0)
   - fb76fc5 Parameterize `JsonModuleTest` so that it runs tests for both v1.0 
and v2.0 formats.
   
   ## Verifying
   
   - The parameterized `JsonModuleTest` should cover this change.
   - Manually verified functionality by locally running a modified version of 
the Python greeter example, with state TTL enabled.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to