Github user sandhyasun commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1586#discussion_r192186115
--- Diff: core/sql/cli/Context.cpp ---
@@ -3163,6 +3163,59 @@ Lng32 ContextCli::setSecInvalidKeys(
}
+Int32 ContextCli::checkLobLock(char *inLobLockId, NABoolean *found)
+{
+ Int32 retcode = 0;
+ *found = FALSE;
+ CliGlobals *cliGlobals = getCliGlobals();
+ StatsGlobals *statsGlobals = GetCliGlobals()->getStatsGlobals();
+ if (cliGlobals->getStatsGlobals() == NULL)
+ {
+ (diagsArea_) << DgSqlCode(-EXE_RTS_NOT_STARTED);
+ return diagsArea_.mainSQLCODE();
+ }
+ statsGlobals->checkLobLock(cliGlobals,inLobLockId);
+ if (inLobLockId != NULL)
+ *found = TRUE;
+ return retcode;
+}
+Lng32 ContextCli::setLobLock(
+ /* IN */ char *lobLockId // objID+column number
+ )
+{
+ CliGlobals *cliGlobals = getCliGlobals();
+ if (cliGlobals->getStatsGlobals() == NULL)
+ {
+ (diagsArea_) << DgSqlCode(-EXE_RTS_NOT_STARTED);
+ return diagsArea_.mainSQLCODE();
+ }
+ ComDiagsArea *tempDiagsArea = &diagsArea_;
+ tempDiagsArea->clear();
+
+ IpcServer *ssmpServer = ssmpManager_->getSsmpServer(exHeap(),
+ cliGlobals->myNodeName(),
+ cliGlobals->myCpu(), tempDiagsArea);
+ if (ssmpServer == NULL)
+ return diagsArea_.mainSQLCODE();
+
+ SsmpClientMsgStream *ssmpMsgStream = new (cliGlobals->getIpcHeap())
+ SsmpClientMsgStream((NAHeap *)cliGlobals->getIpcHeap(),
+ ssmpManager_, tempDiagsArea);
+ ssmpMsgStream->addRecipient(ssmpServer->getControlConnection());
+ LobLockRequest *llMsg =
+ new (cliGlobals->getIpcHeap()) LobLockRequest(
+ cliGlobals->getIpcHeap(),
+ lobLockId);
+ *ssmpMsgStream << *llMsg;
+ // Call send with no timeout.
+ ssmpMsgStream->send();
--- End diff --
Yes that's how it's "supposed" to work and we are indeed replying on all
this working well jsut like we do for Query Invalidation. More testing and
error and crash scenarios may need to be addressed in a future checkin.
---