asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianf...@apache.org
Subject incubator-asterixdb git commit: ASTERIXDB-1164 Fix the racing condition in CodePointToStringDescriptor
Date Thu, 12 Nov 2015 19:31:08 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master fa7963b5a -> 7c7e85690


ASTERIXDB-1164 Fix the racing condition in CodePointToStringDescriptor

The following commits from your working branch will be included:

commit 3074d479468f5f1d512e48c03eb209a45e482f2d
Author: JavierJia <jianfeng.jia@gmail.com>
Date:   Wed Nov 11 20:40:00 2015 -0800

    fix the racing condition in CodePointToStringDescriptor

Change-Id: I7c440731798e2ec8a4f0ab51be06ef7032835193
Reviewed-on: https://asterix-gerrit.ics.uci.edu/484
Reviewed-by: Cameron Samak <csamak@apache.org>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/commit/7c7e8569
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/tree/7c7e8569
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/diff/7c7e8569

Branch: refs/heads/master
Commit: 7c7e85690fb06e9dc6745e4f97eecb3a1f15389c
Parents: fa7963b
Author: JavierJia <jianfeng.jia@gmail.com>
Authored: Wed Nov 11 20:40:58 2015 -0800
Committer: Jianfeng Jia <jianfeng.jia@gmail.com>
Committed: Thu Nov 12 11:27:16 2015 -0800

----------------------------------------------------------------------
 .../data/nontagged/serde/AObjectSerializerDeserializer.java  | 4 ++++
 .../evaluators/functions/CodePointToStringDescriptor.java    | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/7c7e8569/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AObjectSerializerDeserializer.java
----------------------------------------------------------------------
diff --git a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AObjectSerializerDeserializer.java
b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AObjectSerializerDeserializer.java
index ca2557a..b2cb477 100644
--- a/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AObjectSerializerDeserializer.java
+++ b/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/serde/AObjectSerializerDeserializer.java
@@ -210,6 +210,7 @@ public class AObjectSerializerDeserializer implements ISerializerDeserializer<IA
             }
             case BINARY: {
                 aBinarySerDer.serialize((ABinary) instance, out);
+                break;
             }
             case DATE: {
                 ADateSerializerDeserializer.INSTANCE.serialize((ADate) instance, out);
@@ -261,12 +262,15 @@ public class AObjectSerializerDeserializer implements ISerializerDeserializer<IA
             }
             case ORDEREDLIST: {
                 AOrderedListSerializerDeserializer.SCHEMALESS_INSTANCE.serialize((AOrderedList)
instance, out);
+                break;
             }
             case UNORDEREDLIST: {
                 AUnorderedListSerializerDeserializer.SCHEMALESS_INSTANCE.serialize((AUnorderedList)
instance, out);
+                break;
             }
             case TYPE: {
                 ATypeSerializerDeserializer.INSTANCE.serialize((IAType) instance, out);
+                break;
             }
             default: {
                 throw new NotImplementedException("No serializer/deserializer implemented
for type " + t.getTypeTag()

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/7c7e8569/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CodePointToStringDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CodePointToStringDescriptor.java
b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CodePointToStringDescriptor.java
index 42c5c49..3b89eba 100644
--- a/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CodePointToStringDescriptor.java
+++ b/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/CodePointToStringDescriptor.java
@@ -48,10 +48,6 @@ public class CodePointToStringDescriptor extends AbstractScalarFunctionDynamicDe
         }
     };
 
-    private final static byte[] currentUTF8 = new byte[6];
-    private final static byte[] tempStoreForLength = new byte[5];
-    private final byte stringTypeTag = ATypeTag.STRING.serialize();
-
     @Override
     public ICopyEvaluatorFactory createEvaluatorFactory(final ICopyEvaluatorFactory[] args)
{
         return new ICopyEvaluatorFactory() {
@@ -67,6 +63,10 @@ public class CodePointToStringDescriptor extends AbstractScalarFunctionDynamicDe
                     private ArrayBackedValueStorage outInputList = new ArrayBackedValueStorage();
                     private ICopyEvaluator evalList = listEvalFactory.createEvaluator(outInputList);
 
+                    private final byte[] currentUTF8 = new byte[6];
+                    private final byte[] tempStoreForLength = new byte[5];
+                    private final byte stringTypeTag = ATypeTag.STRING.serialize();
+
                     @Override
                     public void evaluate(IFrameTupleReference tuple) throws AlgebricksException
{
                         try {


Mime
View raw message