IGNITE-1961: Implemented opto for string lookups.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/2cb55c4e Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/2cb55c4e Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/2cb55c4e Branch: refs/heads/ignite-1961 Commit: 2cb55c4e37e046828be7b041c781179d0ec8eae4 Parents: 0e07fb2 Author: vozerov-gridgain <[email protected]> Authored: Fri Nov 20 17:28:27 2015 +0300 Committer: vozerov-gridgain <[email protected]> Committed: Fri Nov 20 17:28:27 2015 +0300 ---------------------------------------------------------------------- .../apache/ignite/internal/portable/BinaryReaderExImpl.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/2cb55c4e/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java index cd365ed..4653ad3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/portable/BinaryReaderExImpl.java @@ -1434,7 +1434,6 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje po = new BinaryObjectImpl(ctx, in.readByteArray(len), 0); } else { - // TODO: Rework offheaps. if (in.offheapPointer() == 0) po = new BinaryObjectImpl(ctx, in.array(), start); else @@ -2500,9 +2499,10 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje switch (confirm) { case CONFIRMED: // The best case: got order without ID calculation and (ID -> order) lookup. - order = expOrder; + if (expOrder == 0) + streamPosition(start + hdrLen); - break; + return true; case REJECTED: // Rejected, no more speculations are possible. Fallback to the slowest scenario. @@ -2596,7 +2596,6 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje int pos = start + PortableUtils.fieldOffsetRelative(in, offsetPos, fieldOffsetLen); - // TODO: Convert to unsafe mode. streamPosition(pos); return true; @@ -2628,7 +2627,6 @@ public class BinaryReaderExImpl implements BinaryReader, BinaryRawReaderEx, Obje int pos = start + PortableUtils.fieldOffsetRelative(in, searchPos + PortableUtils.FIELD_ID_LEN, fieldOffsetLen); - // TODO: Convert to unsafe mode. streamPosition(pos); return true;
