[JBoss JIRA] (ISPN-4910) Document inconsistent behavior of ReadCommitted isolation level in some scenarios
by Martin Gencur (JIRA)
[ https://issues.jboss.org/browse/ISPN-4910?page=com.atlassian.jira.plugin.... ]
Martin Gencur updated ISPN-4910:
--------------------------------
Description:
Document the following (inconsistent) behavior which was also described in an email thread http://lists.jboss.org/pipermail/infinispan-dev/2013-September/013769.html:
{code:java}
public void testSizeWithPreviousRead() throws Exception {
tm(0).begin();
cache(0).put(k0, "v0");
cache(0).put(k1, "v1");
assertEquals(2, cache(0).size());
tm(0).commit();
tm(0).begin();
//make sure we read k1 in this transaction
assertEquals("v1", cache(0).get(k1));
final Transaction tx1 = tm(0).suspend();
//another tx working on the same keys
tm(0).begin();
//remove the key that was previously read in another tx
cache(0).remove(k1);
cache(0).put(k0, "v2");
tm(0).commit();
tm(0).resume(tx1);
//we read k1 earlier but in READ_COMMITTED MODE, the size() method should NOT take the key into account
assertEquals(1, cache(0).size());
//^^^^^ the test fails here, cache.size() return 2 instead of expected 1
assertEquals("v2", cache(0).get(k0));
assertNull(cache(0).get(k1));
tm(0).commit();
assertNull(cache(1).get(k1));
}
{code}
I will add tests as part of ISPN-4820 to show the behavior, we just need to document it.
was:
Document the following (incorrect and unexpected) behavior which was also described in an email thread http://lists.jboss.org/pipermail/infinispan-dev/2013-September/013769.html:
{code:java}
public void testSizeWithPreviousRead() throws Exception {
tm(0).begin();
cache(0).put(k0, "v0");
cache(0).put(k1, "v1");
assertEquals(2, cache(0).size());
tm(0).commit();
tm(0).begin();
//make sure we read k1 in this transaction
assertEquals("v1", cache(0).get(k1));
final Transaction tx1 = tm(0).suspend();
//another tx working on the same keys
tm(0).begin();
//remove the key that was previously read in another tx
cache(0).remove(k1);
cache(0).put(k0, "v2");
tm(0).commit();
tm(0).resume(tx1);
//we read k1 earlier but in READ_COMMITTED MODE, the size() method should NOT take the key into account
assertEquals(1, cache(0).size());
//^^^^^ the test fails here, cache.size() return 2 instead of expected 1
assertEquals("v2", cache(0).get(k0));
assertNull(cache(0).get(k1));
tm(0).commit();
assertNull(cache(1).get(k1));
}
{code}
I will add tests as part of ISPN-4820 to show the behavior, we just need to document it.
> Document inconsistent behavior of ReadCommitted isolation level in some scenarios
> ---------------------------------------------------------------------------------
>
> Key: ISPN-4910
> URL: https://issues.jboss.org/browse/ISPN-4910
> Project: Infinispan
> Issue Type: Task
> Components: Documentation-Core
> Affects Versions: 7.0.0.CR2
> Reporter: Martin Gencur
>
> Document the following (inconsistent) behavior which was also described in an email thread http://lists.jboss.org/pipermail/infinispan-dev/2013-September/013769.html:
> {code:java}
> public void testSizeWithPreviousRead() throws Exception {
> tm(0).begin();
> cache(0).put(k0, "v0");
> cache(0).put(k1, "v1");
> assertEquals(2, cache(0).size());
> tm(0).commit();
> tm(0).begin();
> //make sure we read k1 in this transaction
> assertEquals("v1", cache(0).get(k1));
> final Transaction tx1 = tm(0).suspend();
> //another tx working on the same keys
> tm(0).begin();
> //remove the key that was previously read in another tx
> cache(0).remove(k1);
> cache(0).put(k0, "v2");
> tm(0).commit();
> tm(0).resume(tx1);
> //we read k1 earlier but in READ_COMMITTED MODE, the size() method should NOT take the key into account
> assertEquals(1, cache(0).size());
> //^^^^^ the test fails here, cache.size() return 2 instead of expected 1
> assertEquals("v2", cache(0).get(k0));
> assertNull(cache(0).get(k1));
> tm(0).commit();
> assertNull(cache(1).get(k1));
> }
> {code}
> I will add tests as part of ISPN-4820 to show the behavior, we just need to document it.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 5 months
[JBoss JIRA] (ISPN-4900) Split-brain: cancelled ST results in missing data
by Radim Vansa (JIRA)
[ https://issues.jboss.org/browse/ISPN-4900?page=com.atlassian.jira.plugin.... ]
Radim Vansa updated ISPN-4900:
------------------------------
Attachment: log.txt
> Split-brain: cancelled ST results in missing data
> -------------------------------------------------
>
> Key: ISPN-4900
> URL: https://issues.jboss.org/browse/ISPN-4900
> Project: Infinispan
> Issue Type: Bug
> Components: State Transfer
> Reporter: Radim Vansa
> Priority: Critical
> Attachments: log.txt
>
>
> 1. Cluster [A, B, C, D], in CH 1 segment X owned by [D, C]
> 2. Split brain [A, B], [C, D]: A and B detects that D is missing, therefore they get view [A, B, C] and start rebalancing, in CH 2 segment X is owned by [C, B]
> 3. A and B get new view [A, B] (C is missing) and state transfer of X is cancelled, nodes enter degraded mode.
> 4. Split brain is fixed, all nodes find each other and merge - B starts to be AVAILABLE, but still does not have data for X
> 5. Subsequent requests on B return null upon cache.get()
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 5 months
[JBoss JIRA] (ISPN-4910) Document inconsistent behavior of ReadCommitted isolation level in some scenarios
by Martin Gencur (JIRA)
[ https://issues.jboss.org/browse/ISPN-4910?page=com.atlassian.jira.plugin.... ]
Martin Gencur updated ISPN-4910:
--------------------------------
Summary: Document inconsistent behavior of ReadCommitted isolation level in some scenarios (was: Document incorrect behavior of ReadCommitted isolation level in some scenarios)
> Document inconsistent behavior of ReadCommitted isolation level in some scenarios
> ---------------------------------------------------------------------------------
>
> Key: ISPN-4910
> URL: https://issues.jboss.org/browse/ISPN-4910
> Project: Infinispan
> Issue Type: Task
> Components: Documentation-Core
> Affects Versions: 7.0.0.CR2
> Reporter: Martin Gencur
>
> Document the following (incorrect and unexpected) behavior which was also described in an email thread http://lists.jboss.org/pipermail/infinispan-dev/2013-September/013769.html:
> {code:java}
> public void testSizeWithPreviousRead() throws Exception {
> tm(0).begin();
> cache(0).put(k0, "v0");
> cache(0).put(k1, "v1");
> assertEquals(2, cache(0).size());
> tm(0).commit();
> tm(0).begin();
> //make sure we read k1 in this transaction
> assertEquals("v1", cache(0).get(k1));
> final Transaction tx1 = tm(0).suspend();
> //another tx working on the same keys
> tm(0).begin();
> //remove the key that was previously read in another tx
> cache(0).remove(k1);
> cache(0).put(k0, "v2");
> tm(0).commit();
> tm(0).resume(tx1);
> //we read k1 earlier but in READ_COMMITTED MODE, the size() method should NOT take the key into account
> assertEquals(1, cache(0).size());
> //^^^^^ the test fails here, cache.size() return 2 instead of expected 1
> assertEquals("v2", cache(0).get(k0));
> assertNull(cache(0).get(k1));
> tm(0).commit();
> assertNull(cache(1).get(k1));
> }
> {code}
> I will add tests as part of ISPN-4820 to show the behavior, we just need to document it.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 5 months
[JBoss JIRA] (ISPN-4900) Split-brain: cancelled ST results in missing data
by Radim Vansa (JIRA)
[ https://issues.jboss.org/browse/ISPN-4900?page=com.atlassian.jira.plugin.... ]
Radim Vansa updated ISPN-4900:
------------------------------
Attachment: log.txt
This is a log from different run. I think that it's not correct for the partition to become AVAILABLE at 11:54:53,901
> Split-brain: cancelled ST results in missing data
> -------------------------------------------------
>
> Key: ISPN-4900
> URL: https://issues.jboss.org/browse/ISPN-4900
> Project: Infinispan
> Issue Type: Bug
> Components: State Transfer
> Reporter: Radim Vansa
> Priority: Critical
> Attachments: log.txt
>
>
> 1. Cluster [A, B, C, D], in CH 1 segment X owned by [D, C]
> 2. Split brain [A, B], [C, D]: A and B detects that D is missing, therefore they get view [A, B, C] and start rebalancing, in CH 2 segment X is owned by [C, B]
> 3. A and B get new view [A, B] (C is missing) and state transfer of X is cancelled, nodes enter degraded mode.
> 4. Split brain is fixed, all nodes find each other and merge - B starts to be AVAILABLE, but still does not have data for X
> 5. Subsequent requests on B return null upon cache.get()
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 5 months
[JBoss JIRA] (ISPN-4910) Document incorrect behavior of ReadCommitted isolation level in some scenarios
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-4910?page=com.atlassian.jira.plugin.... ]
Dan Berindei commented on ISPN-4910:
------------------------------------
[~mgencur] as discussed on the mailing list, the behaviour is just unexpected, not incorrect :)
In READ_COMMITTED isolation, the second read is allowed to return _any_ committed value of {{k1}}, not necessarily the last committed value.
> Document incorrect behavior of ReadCommitted isolation level in some scenarios
> ------------------------------------------------------------------------------
>
> Key: ISPN-4910
> URL: https://issues.jboss.org/browse/ISPN-4910
> Project: Infinispan
> Issue Type: Task
> Components: Documentation-Core
> Affects Versions: 7.0.0.CR2
> Reporter: Martin Gencur
>
> Document the following (incorrect and unexpected) behavior which was also described in an email thread http://lists.jboss.org/pipermail/infinispan-dev/2013-September/013769.html:
> {code:java}
> public void testSizeWithPreviousRead() throws Exception {
> tm(0).begin();
> cache(0).put(k0, "v0");
> cache(0).put(k1, "v1");
> assertEquals(2, cache(0).size());
> tm(0).commit();
> tm(0).begin();
> //make sure we read k1 in this transaction
> assertEquals("v1", cache(0).get(k1));
> final Transaction tx1 = tm(0).suspend();
> //another tx working on the same keys
> tm(0).begin();
> //remove the key that was previously read in another tx
> cache(0).remove(k1);
> cache(0).put(k0, "v2");
> tm(0).commit();
> tm(0).resume(tx1);
> //we read k1 earlier but in READ_COMMITTED MODE, the size() method should NOT take the key into account
> assertEquals(1, cache(0).size());
> //^^^^^ the test fails here, cache.size() return 2 instead of expected 1
> assertEquals("v2", cache(0).get(k0));
> assertNull(cache(0).get(k1));
> tm(0).commit();
> assertNull(cache(1).get(k1));
> }
> {code}
> I will add tests as part of ISPN-4820 to show the behavior, we just need to document it.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 5 months
[JBoss JIRA] (ISPN-4910) Document incorrect behavior of ReadCommitted isolation level in some scenarios
by Martin Gencur (JIRA)
Martin Gencur created ISPN-4910:
-----------------------------------
Summary: Document incorrect behavior of ReadCommitted isolation level in some scenarios
Key: ISPN-4910
URL: https://issues.jboss.org/browse/ISPN-4910
Project: Infinispan
Issue Type: Task
Components: Documentation-Core
Affects Versions: 7.0.0.CR2
Reporter: Martin Gencur
Document the following (incorrect and unexpected) behavior which was also described in an email thread http://lists.jboss.org/pipermail/infinispan-dev/2013-September/013769.html:
{code:java}
public void testSizeWithPreviousRead() throws Exception {
tm(0).begin();
cache(0).put(k0, "v0");
cache(0).put(k1, "v1");
assertEquals(2, cache(0).size());
tm(0).commit();
tm(0).begin();
//make sure we read k1 in this transaction
assertEquals("v1", cache(0).get(k1));
final Transaction tx1 = tm(0).suspend();
//another tx working on the same keys
tm(0).begin();
//remove the key that was previously read in another tx
cache(0).remove(k1);
cache(0).put(k0, "v2");
tm(0).commit();
tm(0).resume(tx1);
//we read k1 earlier but in READ_COMMITTED MODE, the size() method should NOT take the key into account
assertEquals(1, cache(0).size());
//^^^^^ the test fails here, cache.size() return 2 instead of expected 1
assertEquals("v2", cache(0).get(k0));
assertNull(cache(0).get(k1));
tm(0).commit();
assertNull(cache(1).get(k1));
}
{code}
I will add tests as part of ISPN-4820 to show the behavior, we just need to document it.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
11 years, 5 months