Fixed IgniteCachePartitionLossPolicySelfTest.
@@ -248,12 +248,11 @@ public class GridDhtPartitionMap implements Comparable<GridDhtPartitionMap>, Ext
for (Map.Entry<Integer, GridDhtPartitionState> entry : map.entrySet()) {
int ordinal = entry.getValue().ordinal();
- assert ordinal == (ordinal & 0x3);
+ assert ordinal == (ordinal & 0x7);
assert entry.getKey() < CacheConfiguration.MAX_PARTITIONS_COUNT : entry.getKey();
- int coded = (ordinal << 14) | entry.getKey();
-
- out.writeShort((short)coded);
+ out.writeByte(ordinal);
+ out.writeShort(entry.getKey());
i++;
}
@@ -281,10 +280,8 @@ public class GridDhtPartitionMap implements Comparable<GridDhtPartitionMap>, Ext
map = U.newHashMap(size);
for (int i = 0; i < size; i++) {
- int entry = in.readShort() & 0xFFFF;
-
- int part = entry & 0x3FFF;
- int ordinal = entry >> 14;
+ int ordinal = in.readByte();
+ int part = in.readShort();
put(part, GridDhtPartitionState.fromOrdinal(ordinal));
}
