You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Dan Smith (JIRA)" <ji...@apache.org> on 2019/08/13 23:41:00 UTC

[jira] [Commented] (GEODE-7085) Cannot recover from disk store if region version is greater than Integer.MAX_VALUE

    [ https://issues.apache.org/jira/browse/GEODE-7085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16906718#comment-16906718 ] 

Dan Smith commented on GEODE-7085:
----------------------------------

Here is a stack trace from the unit test

{code}
@Test
  public void recordGCVersionLargerThanIntMaxValueShouldSucceed() {
    RegionVersionHolder h = createHolder(true);
    long version = ((long) Integer.MAX_VALUE) + 10L;
    h.recordVersion(version);
    assertContainsOnly(h, version);
  }
{code}

{noformat}
java.lang.IndexOutOfBoundsException: bitIndex < 0: -2147483639

	at java.util.BitSet.set(BitSet.java:444)
	at org.apache.geode.internal.cache.versions.RegionVersionHolder.setVersionInBitSet(RegionVersionHolder.java:389)
	at org.apache.geode.internal.cache.versions.RegionVersionHolder.recordVersionWithBitSet(RegionVersionHolder.java:380)
	at org.apache.geode.internal.cache.versions.RegionVersionHolder.recordVersion(RegionVersionHolder.java:346)
	at org.apache.geode.internal.cache.versions.RegionVersionHolder2JUnitTest.recordGCVersionLargerThanIntMaxValueShouldSucceed(RegionVersionHolder2JUnitTest.java:167)
{noformat}

> Cannot recover from disk store if region version is greater than Integer.MAX_VALUE
> ----------------------------------------------------------------------------------
>
>                 Key: GEODE-7085
>                 URL: https://issues.apache.org/jira/browse/GEODE-7085
>             Project: Geode
>          Issue Type: Bug
>          Components: membership, persistence
>            Reporter: Dan Smith
>            Assignee: Dan Smith
>            Priority: Major
>
> We hit an issue where a member failed to recover due to a IndexOutOfBoundsException while recording a version during recovery.
> Looking closer, it looks like the issue is due to the fact that a RegionVersionHolder cannot record a version greater than Integer.MAX_VALUE if it just just constructed.
> When we are recovering from disk, the first thing we read from is the .drf files. The first thing in those drf files is RVV information. We read the RVV records and call recordRecoveredGCVersion.
> When that call gets down inside RegionVersionHolder.recordVersion, there is some logic that is supposed to flush out the bitSet and advance the bitSetVersion. Unfortunately it looks like flushBitSetDuringRecording is not actually doing that. So if version we read from disk is greater than Integer.MAX_VALUE, we wrap around and try to set a negative index in the bitset.
> I can reproduce this with a unit test of RegionVersionVector that records a version greater than Integer.MAX_VALUE. I’m looking into how to fix the flushBitSetDuringRecording method.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)