[Design of JBossCache] - state transfer failure handling
by vblagojevic@jboss.com
Hey,
Complete state transfer, as you might be aware, consists of transferring transient (in-memory) state, associated state (pojo reference map) and persistent state (state fetched from cacheloader). All three states are part of the stream passed between state recipient and state receiver.
Current implementation does not follow all-or-nothing approach when it comes to potential failures. Let me elaborate. At state recipient we get a stream that contains all three states demarcated by special node markers and possibly some error markers if state generation at state provider threw exception(s). If we encounter error markers during stream reading we clear appropriate part of the cache at integration Fqn. Thus during transient state reading if we encounter error markers we clear transient state at state recipient cache node. Similarly if we encounter error markers during persistent state reading we clear underlying cacheloader recipient.
As things stand right now we try to read persistent state from stream even though transient or associated transfer part of the stream contained error marker(s) and were thus not integrated in recipients cache.
Should we keep the current approach and, if not, what are you arguments against the current approach?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971361#3971361
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971361
19 years, 6 months
[Design of JBossCache] - Runtime changes of cache config elements
by manik.surtani@jboss.com
I've created a new annotation to go with org.jboss.cache.config.Configuration - @Dynamic.
This annotation is applied to fields in the Configuration class and if a setter is called on a Configuration object, if the cache is running and the field the setter modifies does not have the @Dynamic annotation a ConfigurationException is thrown.
Easy way to control configuration changes on a running cache - the only question is, which elements should be treated as dynamic? :)
Here is an initial list of the fields:
| private String clusterName = "TreeCache-Group";
| private String clusterConfig = null;
| private boolean useReplQueue = false;
| @Dynamic
| private int replQueueMaxElements = 1000;
| @Dynamic
| private long replQueueInterval = 5000;
| private boolean useInterceptorMbeans = true;
| private boolean fetchInMemoryState = true;
| private short replicationVersion = DEFAULT_REPLICATION_VERSION;
| private String replVersionString = Version.getVersionString(DEFAULT_REPLICATION_VERSION);
| @Dynamic
| private long lockAcquisitionTimeout = 10000;
| @Dynamic
| private long syncReplTimeout = 15000;
| private String evictionPolicyClass = null;
| private CacheMode cacheMode = CacheMode.LOCAL;
| private boolean inactiveOnStartup = false;
| private String serviceName;
| private long initialStateRetrievalTimeout = 10000;
| private IsolationLevel isolationLevel = IsolationLevel.REPEATABLE_READ;
| @Dynamic
| private Element evictionPolicyConfig = null;
| private boolean useRegionBasedMarshalling = false;
| private String transactionManagerLookupClass = null;
| private Element cacheLoaderConfiguration = null;
| @Dynamic
| private boolean syncCommitPhase = false;
| @Dynamic
| private boolean syncRollbackPhase = false;
| private Element buddyReplicationConfig;
| private boolean nodeLockingOptimistic = false;
| private NodeLockingScheme nodeLockingScheme = NodeLockingScheme.PESSIMISTIC;
| private String muxServiceName = null;
| private String muxStackName = "fc-fast-minimalthreads";
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971301#3971301
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971301
19 years, 6 months