ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [41/50] [abbrv] ignite git commit: IGNITE-5941 Fixed binary data format compatibility
Date Mon, 21 Aug 2017 08:40:50 GMT
IGNITE-5941 Fixed binary data format compatibility


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dd89aabe
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dd89aabe
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dd89aabe

Branch: refs/heads/ignite-5578
Commit: dd89aabe3fcfcaffc5b2d7dbed0aefb1c54c5549
Parents: 9ca9bf6
Author: Ilya Lantukh <ilantukh@gridgain.com>
Authored: Fri Aug 18 14:27:40 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Fri Aug 18 14:28:55 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/persistence/MetadataStorage.java         | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/dd89aabe/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/MetadataStorage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/MetadataStorage.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/MetadataStorage.java
index 498ecdd..359e54e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/MetadataStorage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/MetadataStorage.java
@@ -41,6 +41,9 @@ public class MetadataStorage implements MetaStore {
     /** Max index name length (bytes num) */
     public static final int MAX_IDX_NAME_LEN = 255;
 
+    /** Reserved size for index name. Needed for backward compatibility. */
+    public static final int RESERVED_IDX_NAME_LEN = 768;
+
     /** Bytes in byte. */
     private static final int BYTE_LEN = 1;
 
@@ -344,7 +347,7 @@ public class MetadataStorage implements MetaStore {
          */
         private MetaStoreInnerIO(final int ver) {
             // name bytes and 1 byte for length, 8 bytes pageId
-            super(T_METASTORE_INNER, ver, false, MAX_IDX_NAME_LEN + 1 + 8);
+            super(T_METASTORE_INNER, ver, false, RESERVED_IDX_NAME_LEN + 1 + 8);
         }
 
         /** {@inheritDoc} */
@@ -385,7 +388,7 @@ public class MetadataStorage implements MetaStore {
          */
         private MetaStoreLeafIO(final int ver) {
             // 4 byte cache ID, UTF-16 symbols and 1 byte for length, 8 bytes pageId
-            super(T_METASTORE_LEAF, ver, MAX_IDX_NAME_LEN + 1 + 8);
+            super(T_METASTORE_LEAF, ver, RESERVED_IDX_NAME_LEN + 1 + 8);
         }
 
         /** {@inheritDoc} */


Mime
View raw message