You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by zu...@apache.org on 2016/05/16 20:55:48 UTC

[11/46] incubator-quickstep git commit: Fixed the lock problem with AggregationHandleSum::mergeStates (#189)

Fixed the lock problem with AggregationHandleSum::mergeStates (#189)

Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/3f72ac02
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/3f72ac02
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/3f72ac02

Branch: refs/heads/master
Commit: 3f72ac02c2a55da47f003074c352a159083222fc
Parents: 1af9302
Author: Jianqiao Zhu <ji...@cs.wisc.edu>
Authored: Mon Apr 25 15:18:28 2016 -0500
Committer: Jignesh Patel <pa...@users.noreply.github.com>
Committed: Mon Apr 25 15:18:28 2016 -0500

----------------------------------------------------------------------
 expressions/aggregation/AggregationHandleSum.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3f72ac02/expressions/aggregation/AggregationHandleSum.cpp
----------------------------------------------------------------------
diff --git a/expressions/aggregation/AggregationHandleSum.cpp b/expressions/aggregation/AggregationHandleSum.cpp
index 410fecb..14421d2 100644
--- a/expressions/aggregation/AggregationHandleSum.cpp
+++ b/expressions/aggregation/AggregationHandleSum.cpp
@@ -144,7 +144,7 @@ void AggregationHandleSum::mergeStates(
   const AggregationStateSum &sum_source = static_cast<const AggregationStateSum&>(source);
   AggregationStateSum *sum_destination = static_cast<AggregationStateSum*>(destination);
 
-  SpinMutexLock(sum_destination->mutex_);
+  SpinMutexLock lock(sum_destination->mutex_);
   sum_destination->sum_ = merge_operator_->applyToTypedValues(sum_destination->sum_,
                                                               sum_source.sum_);
   sum_destination->null_ = sum_destination->null_ && sum_source.null_;