Explorar o código

Merge branch 'candidate-4.2.12' into candidate-5.0.4

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman %!s(int64=10) %!d(string=hai) anos
pai
achega
b2efb8d9bd
Modificáronse 2 ficheiros con 9 adicións e 4 borrados
  1. 8 3
      dali/base/dasds.cpp
  2. 1 1
      ecl/hqlcpp/hqlhtcpp.cpp

+ 8 - 3
dali/base/dasds.cpp

@@ -7715,7 +7715,7 @@ void CCovenSDSManager::createConnection(SessionId sessionId, unsigned mode, unsi
             try
             {
                 loop
-                {                       
+                {
                     try
                     {
                         Owned<IPropertyTreeIterator> iter = root->getElements(xpath+1);
@@ -7730,8 +7730,13 @@ void CCovenSDSManager::createConnection(SessionId sessionId, unsigned mode, unsi
                                 freeExistingLocks.add(existing);
                                 {
                                     unsigned remaining;
-                                    if (tm.timedout(&remaining))
-                                        throw MakeSDSException(SDSExcpt_LockTimeout, "Failed to establish lock to %s, timeout whilst retrying connection to orphaned connection path", xpath);
+                                    if (timeout)
+                                    {
+                                        if (tm.timedout(&remaining))
+                                            throw MakeSDSException(SDSExcpt_LockTimeout, "Failed to establish lock to %s, timeout whilst retrying connection to orphaned connection path", xpath);
+                                    }
+                                    else
+                                        remaining = 0; // a timeout of 0 means fail immediately if locked
                                     CConnectExistingLockCallback connectLockCallback(xpath, connectionId, existing, &connectCrit);
                                     lock(existing, xpath, connectionId, sessionId, mode, remaining, connectLockCallback);
                                 }

+ 1 - 1
ecl/hqlcpp/hqlhtcpp.cpp

@@ -14967,7 +14967,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivitySerialize(BuildCtx & ctx, IHql
 
     IHqlExpression * record = expr->queryRecord();
     HqlExprArray args;
-    args.append(*createSerializer(ctx, record, serializeForm, kind));
+    args.append(*createSerializer(funcctx, record, serializeForm, kind));
     args.append(*ensureActiveRow(dataset));
     Owned<ITypeInfo> type = makeTransformType(record->getType());
     OwnedHqlExpr call = bindFunctionCall(func, args, type);