[ 
https://issues.apache.org/jira/browse/GEODE-4098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16301760#comment-16301760
 ] 

ASF GitHub Bot commented on GEODE-4098:
---------------------------------------

mhansonp commented on a change in pull request #169: GEODE-4098, add mutex 
timeout 
URL: https://github.com/apache/geode-native/pull/169#discussion_r158537765
 
 

 ##########
 File path: cppcache/src/ClientMetadataService.cpp
 ##########
 @@ -461,7 +466,14 @@ void ClientMetadataService::markPrimaryBucketForTimeout(
     std::shared_ptr<BucketServerLocation>& serverLocation, int8_t& version) {
   if (m_bucketWaitTimeout == std::chrono::milliseconds::zero()) return;
 
-  WriteGuard guard(m_PRbucketStatusLock);
+  std::unique_lock<std::timed_mutex> guard(
+      m_timedBucketStatusLock,
+      std::chrono::milliseconds(DEFAULT_MUTEX_TIMEOUT));
+  if (!guard.owns_lock()) {
+    LOGERROR("Buckets statuses container write mutex timeout %d milliseconds",
+             DEFAULT_MUTEX_TIMEOUT);
 
 Review comment:
   %d should cause a warning. switch to %lld.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Mutex guarding buckets statuses container has no timeout hanldling
> ------------------------------------------------------------------
>
>                 Key: GEODE-4098
>                 URL: https://issues.apache.org/jira/browse/GEODE-4098
>             Project: Geode
>          Issue Type: Bug
>          Components: native client
>            Reporter: Igor Barchak
>             Fix For: 1.2.0
>
>
> Mutex guarding buckets statuses container has no timeout handling,in 
> ClientMetadataService.cpp
> Can cause messages stuck on client 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to