usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject [33/38] usergrid git commit: Fix issue with V1 impl of UniqueValue serialization from creating unecessarily large ByteBuffers.
Date Wed, 17 Aug 2016 21:48:40 GMT
Fix issue with V1 impl of UniqueValue serialization from creating unecessarily large ByteBuffers.


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

Branch: refs/heads/master
Commit: 324f94d416617492775ce8608ccd7c822d193be7
Parents: 6efb5ba
Author: Michael Russo <mrusso@apigee.com>
Authored: Sun May 8 23:49:30 2016 +0800
Committer: Michael Russo <mrusso@apigee.com>
Committed: Sun May 8 23:49:30 2016 +0800

----------------------------------------------------------------------
 .../serialization/impl/UniqueValueSerializationStrategyV1Impl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/324f94d4/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyV1Impl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyV1Impl.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyV1Impl.java
index 6421869..d305044 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyV1Impl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyV1Impl.java
@@ -202,7 +202,7 @@ public class UniqueValueSerializationStrategyV1Impl  extends UniqueValueSerializ
             fieldEntry.getField().getTypeName().name().length();
 
         // we always need to add length for the 2 byte comparator short,  2 byte length short
and 1 byte equality
-        size += keys.size()*65;
+        size += keys.size()*5;
 
         // uuid type comparator is longest, ensure we allocate buffer using the max size
to avoid overflow
         size += keys.size()*comparator.length();


Mime
View raw message