[JBoss JIRA] Created: (ISPN-999) Support eventual consistency
by Manik Surtani (JIRA)
Support eventual consistency
----------------------------
Key: ISPN-999
URL: https://issues.jboss.org/browse/ISPN-999
Project: Infinispan
Issue Type: Feature Request
Components: Distributed Cache, Locking and Concurrency
Reporter: Manik Surtani
Assignee: Manik Surtani
Fix For: 5.1.0.BETA1, 5.1.0.Final
Essentially, it is about supporting eventual consistency in Infinispan. Currently Infinispan is strongly consistent when using synchronous distribution mode. Each data owner receives updates synchronously so anyone anywhere on the cluster doing a GET will see the correct value. The only exception is during a rehash (when a new node joins or leaves), that consistency is eventual since the GET may reach a new joiner who may not have applied state it receives from its neighbours yet. However this is hidden from users since the GET is sent to> 1 data owner and if an UnsureResponse is received (determined by the fact that a new joiner responds and the new joiner wouldn't have finished applying state), the caller thread waits for more definite responses.
However, there is a use case for being eventually consistent as well: the main benefits being speed and partition tolerance. E.g., if we use distribution in asynchronous mode, the writes become *much* faster. However, anyone anywhere doing a GET will have to perform the GET on all data owners, and compare the versions of the data received to determine which is the latest. And if there is a conflict, to pass back all values to the user.
So in terms of design, what I have in mind is:
* All cache entries are versioned using vector clocks. One vector clock per node.
* When a node performs a GET, the GET is sent to all data owners (concurrently), and the value + version is retrieved from each.
* If the versions are all the same (or they can be "fast forwarded"), the value is returned
* Otherwise, all potential values and their versions are returned
* A resolve() API should be provided where application code may provide a "hint" as to which version should be "correct" - which will cause an update.
* In terms of implementation, this will touch the DistributionInterceptor, InternalCacheEntry and relevant factories, some config code (since this should be consistency model should be configurable), and a new public interface.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] Created: (ISPN-1394) Investigate possibility of doing manual rehashing
by Galder Zamarreño (JIRA)
Investigate possibility of doing manual rehashing
-------------------------------------------------
Key: ISPN-1394
URL: https://issues.jboss.org/browse/ISPN-1394
Project: Infinispan
Issue Type: Feature Request
Components: Distributed Cache
Reporter: Galder Zamarreño
Assignee: Manik Surtani
Fix For: 5.2.0.FINAL
Investigate the possibility of being able to do manual rehashing:
- Approach used Dynamo (and Cassandra)
- If you're adding 100 nodes, using manual rehashing could reduce traffic and make it more predictable
- Could be called via JMX
- But removing 10 nodes could be problematic. Unless number of owners is 11 or higher, which will guarantee that at least a copy of data is around
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (ISPN-2005) Memcached server throwing UnknownOperationException with many clients
by Galder Zamarreño (JIRA)
Galder Zamarreño created ISPN-2005:
--------------------------------------
Summary: Memcached server throwing UnknownOperationException with many clients
Key: ISPN-2005
URL: https://issues.jboss.org/browse/ISPN-2005
Project: Infinispan
Issue Type: Bug
Components: Cache Server
Affects Versions: 5.1.3.FINAL
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Fix For: 5.1.4.FINAL
With native memcached out of the box, I can execute such a test without any problems:
1000 clients (threads), 400 operations per thread, 34% writes
However, running Infinispan Memcached distribution with 1000 worker threads results in exceptions such as:
{code}2012-04-23 16:46:59,893 ERROR (MemcachedServerWorker-1-957) [org.infinispan.server.memcached.MemcachedDecoder] ISPN005003: Exception reported
org.infinispan.server.core.UnknownOperationException: Unknown operation:
at org.infinispan.server.memcached.RequestResolver$.toRequest(MemcachedDecoder.scala:659)
at org.infinispan.server.memcached.MemcachedDecoder.readHeader(MemcachedDecoder.scala:73)
at org.infinispan.server.core.AbstractProtocolDecoder.decodeHeader(AbstractProtocolDecoder.scala:92)
at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:69)
at org.infinispan.server.core.AbstractProtocolDecoder.decode(AbstractProtocolDecoder.scala:45)
at org.infinispan.server.core.transport.CustomReplayingDecoder.callDecode(CustomReplayingDecoder.java:250)
at org.infinispan.server.core.transport.CustomReplayingDecoder.messageReceived(CustomReplayingDecoder.java:223)
at org.infinispan.server.core.AbstractProtocolDecoder.messageReceived(AbstractProtocolDecoder.scala:360)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:351)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:282)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680){code}
Client shows:
{code}2012-04-23 16:46:28.742 INFO net.spy.memcached.MemcachedConnection: Reconnecting due to exception on {QA sa=/127.0.0.1:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}
java.net.SocketException: Connection reset by peer
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:369)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:242)
at net.spy.memcached.MemcachedConnection.run(MemcachedConnection.java:833){code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months