[infinispan-issues] [JBoss JIRA] (ISPN-9794) Allow Cache flushes to stores on demand via JMX trigger
Ryan Emerson (Jira)
issues at jboss.org
Wed Dec 5 05:28:00 EST 2018
[ https://issues.jboss.org/browse/ISPN-9794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan Emerson updated ISPN-9794:
-------------------------------
Description:
We should introduce a {code}flush(Publisher<MarshalledEntry<K, V>>){code} method to the AdvancedCacheWriter interface. This will simply iterate over the cache on a best-effort basis (concurrent updates to the cache may be missed) and write it's contents to the underlying store(s).
The flush method should be called by the PersistenceManager when an appropriate trigger has been manually called by the user, for example JMX or REST.
Adding this capability will allow for use-cases where users don't want to write to the underlying store during normal operation, however in certain circumstances they want to persist the data. To achieve this, the user can configure a store as normal, whilst setting the SKIP_CACHE_LOAD and SKIP_CACHE_STORE flags via AdvancedCache::withFlags.
Alternatively, we could introduce a new attribute to store's which ensures that the store is always skipped except when flushing, e.g. "flush-only". This has the advantage of not requiring users to utilise flags and it will be possible to have multiple stores, some flush-only and other write-through/write-behind.
was:
We should introduce a {code}flush(Publisher<MarshalledEntry<K, V>>){code} method to the AdvancedCacheWriter interface. This will simply iterate over the cache on a best-effort basis (concurrent updates to the cache may be missed) and write it's contents to the underlying store(s).
The flush method should be called by the PersistenceManager when an appropriate trigger has been manually called by the user, for example JMX or REST.
Adding this capability will allow for use-cases where users don't want to write to the underlying store during normal operation, however in certain circumstances they want to persist the data. To achieve this, the user can configure a store as normal, whilst setting the SKIP_CACHE_LOAD and SKIP_CACHE_STORE flags via AdvancedCache::withFlags. Alternatively, we could also introduce a new attribute to store's which ensures that the store is always skipped except when flushing, e.g. "flush-only".
> Allow Cache flushes to stores on demand via JMX trigger
> -------------------------------------------------------
>
> Key: ISPN-9794
> URL: https://issues.jboss.org/browse/ISPN-9794
> Project: Infinispan
> Issue Type: Enhancement
> Components: Loaders and Stores
> Affects Versions: 10.0.0.Alpha1
> Reporter: Ryan Emerson
> Assignee: Ryan Emerson
> Priority: Major
> Fix For: 10.0.0.Final
>
>
> We should introduce a {code}flush(Publisher<MarshalledEntry<K, V>>){code} method to the AdvancedCacheWriter interface. This will simply iterate over the cache on a best-effort basis (concurrent updates to the cache may be missed) and write it's contents to the underlying store(s).
> The flush method should be called by the PersistenceManager when an appropriate trigger has been manually called by the user, for example JMX or REST.
> Adding this capability will allow for use-cases where users don't want to write to the underlying store during normal operation, however in certain circumstances they want to persist the data. To achieve this, the user can configure a store as normal, whilst setting the SKIP_CACHE_LOAD and SKIP_CACHE_STORE flags via AdvancedCache::withFlags.
> Alternatively, we could introduce a new attribute to store's which ensures that the store is always skipped except when flushing, e.g. "flush-only". This has the advantage of not requiring users to utilise flags and it will be possible to have multiple stores, some flush-only and other write-through/write-behind.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the infinispan-issues
mailing list