[JBoss JIRA] (ISPN-5962) Implementation of RpcManagerImpl.invokeRemotely causes high CPU usage
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-5962?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-5962:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 8.1.0.Final
(was: 8.2.0.Alpha1)
Resolution: Done
> Implementation of RpcManagerImpl.invokeRemotely causes high CPU usage
> ---------------------------------------------------------------------
>
> Key: ISPN-5962
> URL: https://issues.jboss.org/browse/ISPN-5962
> Project: Infinispan
> Issue Type: Enhancement
> Components: Core
> Affects Versions: 8.1.0.Beta1
> Reporter: Sanne Grinovero
> Assignee: Pedro Ruivo
> Fix For: 8.1.0.Final
>
> Attachments: CompletableFutureBenchmarks.java
>
>
> The method {{org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(Collection<Address>, ReplicableCommand, RpcOptions)}} is implemented by blocking on a {{CompletableFuture}}, but this then stalls on {{java.util.concurrent.CompletableFuture.waitingGet(boolean)}} by spending a significant amount of CPU time by spinning.
> When implementing RPC calls and having to wait for remote operations, spinning is probably not a good idea. Could we try implementing this in some way to hint towards a more pessimistic lock?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (ISPN-3835) Index Update command is processed before the registry listener is triggered
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-3835?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-3835:
--------------------------------
Fix Version/s: 8.2.0.Alpha1
(was: 8.1.0.Final)
> Index Update command is processed before the registry listener is triggered
> ---------------------------------------------------------------------------
>
> Key: ISPN-3835
> URL: https://issues.jboss.org/browse/ISPN-3835
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 6.0.0.Final
> Reporter: Sanne Grinovero
> Assignee: Gustavo Fernandes
> Priority: Critical
> Labels: 64QueryBlockers
> Fix For: 8.2.0.Alpha1
>
>
> When using the InfinispanIndexManager backend the master node might receive an index update command about an index which it hasn't defined yet.
> Index definitions are triggered by the type registry, which in turn is driven by the ClusterRegistry and an event listener on the ClusterRegistry. It looks like slaves are sending update requests before the master has processed the configuration event.
> This leads to index update commands to be lost (with a stacktrace logged)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (ISPN-3729) Minimize the number of moved segments for SyncConsistentHashFactory
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-3729?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-3729:
--------------------------------
Fix Version/s: 8.2.0.Alpha1
(was: 8.1.0.Final)
> Minimize the number of moved segments for SyncConsistentHashFactory
> -------------------------------------------------------------------
>
> Key: ISPN-3729
> URL: https://issues.jboss.org/browse/ISPN-3729
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 6.0.0.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Fix For: 8.2.0.Alpha1
>
>
> SyncConsistentHash uses an algorithm that's similar to consistent hashing, but when there is a collision (two nodes map to the same segment), the second node is moved to the next segment. Since the nodes are ordered by their UUID, that means it's possible for a joiner to change the mapping of existing nodes.
> In order to make the load distribution more even, SyncConsistentHash also uses "virtual nodes": each node actually maps to multiple segments. This makes the number of collisions much higher (and implicitly, the number of extra moved segments).
> Reading the original [consistent hashing paper|http://thor.cs.ucsb.edu/~ravenben/papers/coreos/kll%2B97.pdf], it looks like the collision handling should be done differently: a joiner should replace an existing node when it's "closer" to the segment boundary, but the existing node should never "lose" segments to another existing node (the property of monotonicity mentioned in the paper). We should investigate whether changing this would allow us to achieve better load balancing by using a much higher number of "virtual nodes" (without moving extra segments). If successful, we could even use SyncConsistentHashFactory as the default hash algorithm.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (ISPN-3684) Improve L1 consitency with backup owners
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-3684?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-3684:
--------------------------------
Fix Version/s: 8.2.0.Alpha1
(was: 8.1.0.Final)
> Improve L1 consitency with backup owners
> ----------------------------------------
>
> Key: ISPN-3684
> URL: https://issues.jboss.org/browse/ISPN-3684
> Project: Infinispan
> Issue Type: Enhancement
> Components: Core
> Affects Versions: 6.0.0.CR1
> Reporter: William Burns
> Assignee: William Burns
> Fix For: 8.2.0.Alpha1
>
>
> ISPN-3648 fixed an issue that can occur when a backup owner replies with an outdated value.
> More details on the original issue can be found at ISPN-3426.
> This JIRA is to improve this fix to be something more desirable.
> There are a few ways that this could be done.
> # Change it so that remote gets only go to the primary owner, which guarantees consistency with that owner (this still has issues with fail over when that primary owner goes down). Also may have performance issues since we don't have backup owners to respond faster.
> # Change it so that values are only added to L1 if the value was retrieved from the primary owner. (note there is still some stuff to think about for fail over here)
> # Multicast the invalidation message from the primary owner after updating the value. This is the simplest approach (no requestors map required), but may also have some performance concerns.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (ISPN-4159) DefaultTwoWayKey2StringMapper encodes objects to strings in a manner that is incompatible with string handling of some databases
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-4159?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-4159:
--------------------------------
Fix Version/s: 8.2.0.Alpha1
(was: 8.1.0.Final)
> DefaultTwoWayKey2StringMapper encodes objects to strings in a manner that is incompatible with string handling of some databases
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-4159
> URL: https://issues.jboss.org/browse/ISPN-4159
> Project: Infinispan
> Issue Type: Bug
> Components: Loaders and Stores
> Affects Versions: 6.0.0.Final
> Reporter: Adrian Nistor
> Assignee: Adrian Nistor
> Fix For: 8.2.0.Alpha1
>
>
> DefaultTwoWayKey2StringMapper uses two neat tricks.
> 1. it does not encode all supported types, it only encodes non-Strings. Strings are kept unmodified.
> 2. it uses a special prefix (unicode char 0xfeff) to mark which strings were encoded and which are plain.
> Unfortunately some databases, notably MySql, interpret the endianness mark (0xfeff, 0xfffe), convert to native byte order and then drop it.
> This leaves us with no clue the string is not an actual String but an encoded representation of another type. This misinterpretation leads later to ClassCastExceptions in various places in core and user code.
> Proposed fix: get rid of #1 and #2 optimisations. Encode all objects, including Strings and always use the ?n prefix (where n stands for the original type). Drop the 0xFEFF marker prefix.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months
[JBoss JIRA] (ISPN-4286) Two concurrent putIfAbsent operations can both return null during rebalance
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-4286?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-4286:
--------------------------------
Fix Version/s: 8.2.0.Alpha1
(was: 8.1.0.Final)
> Two concurrent putIfAbsent operations can both return null during rebalance
> ---------------------------------------------------------------------------
>
> Key: ISPN-4286
> URL: https://issues.jboss.org/browse/ISPN-4286
> Project: Infinispan
> Issue Type: Bug
> Components: Core, State Transfer
> Affects Versions: 6.0.2.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Critical
> Fix For: 8.2.0.Alpha1
>
>
> If the cache topology changes while executing a putIfAbsent operation, the old primary owner will throw an OutdatedTopologyException, and the originator will retry on the new owner.
> When retrying the PutKeyValueCommand on the new primary owner, we compare the current value with the command's new value. If they are equal, we assume that the initial command wrote the old value, and we return {{null}}.
> However, the value might have been written by another putIfAbsent operation. So we could have two {{putIfAbsent(k, v)}} operations, both returning {{null}}.
> {code}
> A is the originator, B is the primary owner, k = null
> A -> B: putIfAbsent(k, v1)
> B dies before writing v, C is now primary owner
> D -> C: putIfAbsent(k, v1) // another put operation from D, with the same value
> C -> D: null // correct
> A -> C: retry_putIfAbsent(k, v1)
> C -> A: null // C assumes A is overwriting its own value, so it's also returning null
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 11 months