m3i54 commented on code in PR #776:
URL: https://github.com/apache/geode-native/pull/776#discussion_r631224771


##########
cppcache/src/RemoteQuery.cpp:
##########
@@ -125,11 +127,11 @@ GfErrType RemoteQuery::executeNoThrow(
     ThinClientBaseDM* tcdm, std::shared_ptr<CacheableVector> paramList) {
   LOGFINEST("%s: executing query: %s", func, m_queryString.c_str());
 
-  TryReadGuard guard(m_queryService->getLock(), m_queryService->invalid());
-
+  boost::shared_lock<boost::shared_mutex> guard{m_queryService->getMutex()};

Review Comment:
   > Were you going to change these patterns to return a `shared_lock` rather 
than the `shared_mutex`?
   
   I tried to change it, but I found a really strange issue in the .Net part:
      - An exception with message "The string binding is invalid" was being 
thrown due to the fact that
      the Apache.Geode DLL has mixed code and compiles with CLR enabled.
      That's something dis-recommended by Boost because under certain
      conditions could cause problems with boost static variables.
      In this case the issue was related to one of the boost::exception
      static variables.
      This issue was solved by removing header inclusion introduced in
      revision 3.
    - Due to above issue, exposing the lock rather than the mutex is not
      possible for now, until a further refactor is made to .Net code, so
      mutex/lock exposition from revision 3 has been reverted.
   
   So I had to revert that particular change. I am creating an issue so we can 
tackle this issue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to