[ 
https://issues.apache.org/jira/browse/IGNITE-15033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladislav Pyatkov updated IGNITE-15033:
---------------------------------------
    Description: 
There is a low probably that partition state restored incorrectly when a cache 
is starting with data on disk.
The issue happened because cluster can save the partition meta page during it 
state is still restored.
The code is shown below (GridCacheOffheapManager.java):

{code:java}
@Override public Map<Integer, Long> restorePartitionStates {
  //Here the metapage was restored from disk, but it state is not recovery in 
GridDhtLocalPartition.
  part.dataStore().init();  
  ... // Here another thread will be able to execute saveStoreMetadata and set 
an incorrect state on the metapage.
  //State will be recovered only here.
  long pageAddr = pageMem.writeLock(grp.groupId(), partMetaId, partMetaPage);
  try {
    int stateId = io.getPartitionState(pageAddr);
    updateState(part, stateId);
  }
  finaly {
    pageMem.writeUnlock(grp.groupId(), partMetaId, partMetaPage, null, changed);
  }
}
{code}


  was:
It has low probably that partition state restored incorrectly when a cache is 
starting with data on disk.
The issue happened because cluster can save the partition meta page during it 
state is still restored.
The code is shown below (GridCacheOffheapManager.java):

{code:java}
@Override public Map<Integer, Long> restorePartitionStates {
  //Here the metapage was restored from disk, but it state is not recovery in 
GridDhtLocalPartition.
  part.dataStore().init();  
  ... // Here another thread will be able to execute saveStoreMetadata and set 
an incorrect state on the metapage.
  //State will be recovered only here.
  long pageAddr = pageMem.writeLock(grp.groupId(), partMetaId, partMetaPage);
  try {
    int stateId = io.getPartitionState(pageAddr);
    updateState(part, stateId);
  }
  finaly {
    pageMem.writeUnlock(grp.groupId(), partMetaId, partMetaPage, null, changed);
  }
}
{code}



> AssertionError: Unexpected rebalance on rebalanced cluster
> ----------------------------------------------------------
>
>                 Key: IGNITE-15033
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15033
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Vladislav Pyatkov
>            Assignee: Vladislav Pyatkov
>            Priority: Major
>
> There is a low probably that partition state restored incorrectly when a 
> cache is starting with data on disk.
> The issue happened because cluster can save the partition meta page during it 
> state is still restored.
> The code is shown below (GridCacheOffheapManager.java):
> {code:java}
> @Override public Map<Integer, Long> restorePartitionStates {
>   //Here the metapage was restored from disk, but it state is not recovery in 
> GridDhtLocalPartition.
>   part.dataStore().init();  
>   ... // Here another thread will be able to execute saveStoreMetadata and 
> set an incorrect state on the metapage.
>   //State will be recovered only here.
>   long pageAddr = pageMem.writeLock(grp.groupId(), partMetaId, partMetaPage);
>   try {
>     int stateId = io.getPartitionState(pageAddr);
>     updateState(part, stateId);
>   }
>   finaly {
>     pageMem.writeUnlock(grp.groupId(), partMetaId, partMetaPage, null, 
> changed);
>   }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to