[ https://issues.apache.org/jira/browse/S4-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196826#comment-13196826
]
Matthieu Morel commented on S4-42:
----------------------------------
I uploaded a solution in the S4-42 branch.
h4. Configuration:
_recoveryAfterExpiration_ can be specified for each prototype with a true|false value. Default
value is false: PEs will *not* be recovered after expiration.
h4. How it works:
When added to a cache, PEs keep the date of insertion, and this date is kept in the checkpoint.
Upon startup of an S4 node, if a checkpoint for the current PE instance if found, it is fetched
and deserialized. Then we evaluate recoveryAfterExpiration:
* true --> restore state from the checkpoint
* false --> compute expiration time from cache insertion + ttl.
** If the PE is not expired, restore state.
** Otherwise, do not restore previous state.
> Optional recovery of expired and checkpointed PEs.
> --------------------------------------------------
>
> Key: S4-42
> URL: https://issues.apache.org/jira/browse/S4-42
> Project: Apache S4
> Issue Type: New Feature
> Affects Versions: 0.4
> Reporter: Matthieu Morel
> Fix For: 0.4
>
>
> S4 provides a caching mechanism for PEs, and PEs can be assigned a time to live. After
that time, the PE instance is removed from the cache and may be garbage collected.
> When combining with the checkpointing mechanism, expired but checkpointed PEs are restored
from a former checkpoint.
> This may or may not be desired, depending on the use case. Therefore we must provide
an option to restore - or not - the state of an expired but checkpointed PE.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
|