You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by su...@apache.org on 2018/06/16 17:09:55 UTC
[25/50] [abbrv] trafodion git commit: Unique string fix.
Unique string fix.
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/2d774d9a
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/2d774d9a
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/2d774d9a
Branch: refs/heads/master
Commit: 2d774d9a17972ab7ad40b72e260a623697c99c13
Parents: 251f3f5
Author: Zalo Correa <za...@esgyn.com>
Authored: Wed Apr 11 09:01:34 2018 -0700
Committer: Zalo Correa <za...@esgyn.com>
Committed: Wed Apr 11 09:01:34 2018 -0700
----------------------------------------------------------------------
core/sqf/monitor/linux/pnode.cxx | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/2d774d9a/core/sqf/monitor/linux/pnode.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/pnode.cxx b/core/sqf/monitor/linux/pnode.cxx
index 5da34cd..b5fa4ed 100644
--- a/core/sqf/monitor/linux/pnode.cxx
+++ b/core/sqf/monitor/linux/pnode.cxx
@@ -1031,8 +1031,9 @@ strId_t CNode::GetStringId( char *candidate, CLNode *targetLNode )
if (trace_settings & TRACE_PROCESS)
{
- trace_printf("%s@%d - Adding unique string id=[%d,%d] (%s), targetLnode=%p\n",
- method_name, __LINE__, id.nid, id.id, candidate, targetLNode );
+ trace_printf("%s@%d - Adding unique string id=[%d,%d] (%s), targetLnode=%p, targetNid=%d\n",
+ method_name, __LINE__, id.nid, id.id, candidate,
+ targetLNode, targetLNode?targetLNode->GetNid():-1 );
}
Config->addUniqueString(id.nid, id.id, candidate);
@@ -1069,6 +1070,22 @@ strId_t CNode::GetStringId( char *candidate, CLNode *targetLNode )
trace_printf("%s@%d - unique string id=[%d,%d] (%s)\n",
method_name, __LINE__, id.nid, id.id, candidate );
}
+
+#ifndef NAMESERVER_PROCESS
+ if (NameServerEnabled)
+ {
+ if (targetLNode != NULL &&
+ !MyNode->IsMyNode(targetLNode->GetNid()))
+ {
+ // Forward the unique string to the target node
+ PtpClient->AddUniqStr( id.nid
+ , id.id
+ , candidate
+ , targetLNode->GetNid()
+ , targetLNode->GetNode()->GetName());
+ }
+ }
+#endif
}
TRACE_EXIT;