[JBoss JIRA] (ISPN-5682) The minimum aggregation function doesn't work with Strings
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5682?page=com.atlassian.jira.plugin.... ]
Adrian Nistor commented on ISPN-5682:
-------------------------------------
Minimum aggregation does work with Strings, see the QueryDslConditionsTest.testMin/testGlobalMin.
The problem here seems to be different, more related to projections on properties of embedded entities rather than the type of the property.
> The minimum aggregation function doesn't work with Strings
> -----------------------------…
[View More]-----------------------------
>
> Key: ISPN-5682
> URL: https://issues.jboss.org/browse/ISPN-5682
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 8.0.0.Beta3
> Reporter: Jakub Markos
> Assignee: Adrian Nistor
> Fix For: 8.1.0.Final
>
>
> This query
> {code}
> public void testGroupBy7() {
> QueryFactory qf = getQueryFactory();
> Query q = qf.from(getModelFactory().getUserImplClass())
> .select(Expression.min("addresses.street"))
> .having("name").eq("Spider").toBuilder()
> .build();
> List<Object[]> list = q.list();
> assertEquals(list.get(0)[0], "Bond Street");
> }
> {code}
> returns in the context of QueryDslConditionsTest test class (https://github.com/infinispan/infinispan/blob/7634c0996cb3a174d2a379f2096...) the street "Old Street", while "Bond Street" is expected.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
[View Less]
9 years, 6 months
[JBoss JIRA] (ISPN-3684) Improve L1 consitency with backup owners
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-3684?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-3684:
------------------------------
Fix Version/s: 8.1.0.Final
(was: 8.0.0.Final)
> Improve L1 consitency with backup owners
> ----------------------------------------
>
> Key: ISPN-3684
> URL: https://issues.jboss.org/browse/ISPN-3684
> Project: Infinispan
> Issue Type: Enhancement
…
[View More]> Components: Core
> Affects Versions: 6.0.0.CR1
> Reporter: William Burns
> Assignee: William Burns
> Fix For: 8.1.0.Final
>
>
> 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.3.15#6346)
[View Less]
9 years, 6 months
[JBoss JIRA] (ISPN-3729) Minimize the number of moved segments for SyncConsistentHashFactory
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-3729?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-3729:
------------------------------
Fix Version/s: 8.1.0.Final
(was: 8.0.0.Final)
> Minimize the number of moved segments for SyncConsistentHashFactory
> -------------------------------------------------------------------
>
> Key: ISPN-3729
> URL: https://issues.jboss.org/browse/ISPN-3729
> Project:…
[View More] Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 6.0.0.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Fix For: 8.1.0.Final
>
>
> 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.3.15#6346)
[View Less]
9 years, 6 months
[JBoss JIRA] (ISPN-4286) Two concurrent putIfAbsent operations can both return null during rebalance
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-4286?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-4286:
------------------------------
Fix Version/s: 8.1.0.Final
(was: 8.0.0.Final)
> Two concurrent putIfAbsent operations can both return null during rebalance
> ---------------------------------------------------------------------------
>
> Key: ISPN-4286
> URL: https://issues.jboss.org/browse/ISPN-4286
> …
[View More] 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.1.0.Final
>
>
> 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.3.15#6346)
[View Less]
9 years, 6 months
[JBoss JIRA] (ISPN-4340) Automatically setup shared indexes when indexing is enabled
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-4340?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-4340:
------------------------------
Fix Version/s: 8.1.0.Final
(was: 8.0.0.Final)
> Automatically setup shared indexes when indexing is enabled
> -----------------------------------------------------------
>
> Key: ISPN-4340
> URL: https://issues.jboss.org/browse/ISPN-4340
> Project: Infinispan
…
[View More]> Issue Type: Feature Request
> Components: Embedded Querying
> Reporter: Sanne Grinovero
> Assignee: Gustavo Fernandes
> Labels: 64QueryBlockers
> Fix For: 8.1.0.Final
>
>
> - on replicated Caches, we should create a default index on a FSDirectory and provide some appropriate default tuning, for example enabling NRT.
> - distributed Caches will need the Infinispan Directory (shared) and a master/slave backend (Infinispan IndexManager, while NRT is not compatible in this case)
> We want to keep the properties configuration structure as well as an "advanced tuning" and override capabilities of the default choices.
> Some more common options like sync/async indexing should probably be promoted to be controlled by the XML elements and configuration DSL excplicitly.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
[View Less]
9 years, 6 months
[JBoss JIRA] (ISPN-4159) DefaultTwoWayKey2StringMapper encodes objects to strings in a manner that is incompatible with string handling of some databases
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-4159?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-4159:
------------------------------
Fix Version/s: 8.1.0.Final
(was: 8.0.0.Final)
> DefaultTwoWayKey2StringMapper encodes objects to strings in a manner that is incompatible with string handling of some databases
> --------------------------------------------------------------------------------------------------------------------------------
>
> …
[View More] 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.1.0.Final
>
>
> 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.3.15#6346)
[View Less]
9 years, 6 months
[JBoss JIRA] (ISPN-3918) Inconsistent view of the cache with putIfAbsent in a non-tx cache during state transfer
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-3918?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-3918:
------------------------------
Fix Version/s: 8.1.0.Final
(was: 8.0.0.Final)
> Inconsistent view of the cache with putIfAbsent in a non-tx cache during state transfer
> ---------------------------------------------------------------------------------------
>
> Key: ISPN-3918
> URL: https://issues.jboss.org/…
[View More]browse/ISPN-3918
> Project: Infinispan
> Issue Type: Bug
> Components: Core, State Transfer
> Affects Versions: 6.0.0.Final
> Reporter: Dan Berindei
> Fix For: 8.1.0.Final
>
> Attachments: ntpiadjst.log.gz
>
>
> In a non-tx cache, sometimes it's possible for a {{get(k)}} to return {{null}} even though a previous {{putIfAbsent(k, v)}} returned a non-null value and the only concurrent operations on the cache are concurrent putIfAbsent calls.
> Say \[B, A, C] are the owners of k (C just joined)
> 1. A starts a {{putIfAbsent(k, v1)}} command, sends it to B
> 2. B forwards the command to A and C
> 3. C writes {{k=v1}}
> 4. C becomes the primary owner of k (owners are now \[C, A])
> 5. A/B see the new topology before committing and throw an outdatedTopologyException
> 6. A retries the command, sends it to C
> 7. C forwards the command to A, which writes {{k=v1}}
> 8. C doesn't have to update the entry, returns null
> If, between steps 3 and 7, another thread on A starts a {{putIfAbsent(k, v2)}} command, the command will fail and return {{v1}} (because the primary owner already has a value). However, a subsequent {{get(k)}} command will return {{null}}, because A is an owner and doesn't have the value.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
[View Less]
9 years, 6 months