[GitHub] geode-native issue #105: GEODE-2891 connect-timeout violation in C++ Native ...

2017-07-07 Thread gregt5259
Github user gregt5259 commented on the issue:

https://github.com/apache/geode-native/pull/105
  
Closed by Ernie Burghardt request as duplicated #106 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] geode-native issue #105: GEODE-2891 connect-timeout violation in C++ Native ...

2017-07-05 Thread pivotal-jbarrett
Github user pivotal-jbarrett commented on the issue:

https://github.com/apache/geode-native/pull/105
  
@gregt5259 please close this pull request since you opened #106.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] geode-native issue #105: GEODE-2891 connect-timeout violation in C++ Native ...

2017-07-03 Thread pivotal-jbarrett
Github user pivotal-jbarrett commented on the issue:

https://github.com/apache/geode-native/pull/105
  
> I suggest to fix the issue by defining handshake pseudo message within 
the range probably defined for such pseudo messages by original design i.e.:
>  typedef enum {
>/* Server couldn't read message; handle it like a server side
>   exception that needs retries */
>HANDSHAKE = -3
>NOT_PUBLIC_API_WITH_TIMEOUT = -2,

I think that would certainly work better but I think ultimately the fix is 
to remove the ambiguity between the C++ API and the Server API by strongly 
typing the duration values as addressed in the mentioned tickets. All duration 
values can be cast to the internal API supported unit without any ambiguity. 
After which there is no need to create this pseudo message to change the unit 
of the ambiguous int value.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] geode-native issue #105: GEODE-2891 connect-timeout violation in C++ Native ...

2017-07-03 Thread gregt5259
Github user gregt5259 commented on the issue:

https://github.com/apache/geode-native/pull/105
  
I suggest to fix the issue by defining handshake pseudo message within the 
range probably defined for such pseudo messages by original design i.e.:

  typedef enum {
/* Server couldn't read message; handle it like a server side
   exception that needs retries */
HANDSHAKE = -3
NOT_PUBLIC_API_WITH_TIMEOUT = -2,

WDYT?

Thanks,
Dr. Gregory Turovets

"…We're all mad here. I'm mad. You're mad."
"How do you know I'm mad?" said Alice.
"You must be," said the Cat, "or you wouldn't have come here."
Alice's Adventures in Wonderland by Lewis 
Carroll.

From: Jacob Barrett [mailto:notificati...@github.com]
Sent: Sunday, July 02, 2017 17:46
To: apache/geode-native 
Cc: Gregory Turovets ; Author 

Subject: Re: [apache/geode-native] GEODE-2891 connect-timeout violation in 
C++ Native Client (#105)


@pivotal-jbarrett requested changes on this pull request.

Please rebase your changes on develop rather than merge.

Do not include comments with ticket numbers.
Do not include comments with your name or initials.
Do not leave sources commented out, delete or delete not.

Please follow the C++ style of the community.

I am concerned with the approach of trying to define a pseudo message for 
handshaking to get a different timeout unit. This may bite us in the future 
when added new messages to the protocol.

There are a few tickets in flight, or soon to be in flight, that address 
this problem.

https://issues.apache.org/jira/browse/GEODE-3136
https://issues.apache.org/jira/browse/GEODE-3137

I have begun some experiments with GEODE-3136 and should start committing 
to it in a few days. All API exposed timeouts will be based on 
std::chrono::duration so you can clearly see what unit of time your time is and 
the code behind that API doesn't have to guess. GEODE-3137 will address on use 
cases internally that aren't addressed when updating the public API. Any 
configuration files that specify timeout will be updated to take a duration 
string as well in the format of "1234s", "1234ms", etc.



In 
src/cppcache/src/TcrConnection.cpp:

> @@ -318,7 +318,9 @@ bool TcrConnection::InitTcrConnection(

   LOGFINE("Attempting handshake with endpoint %s for %s%s connection", 
endpoint,

   isClientNotification ? (isSecondary ? "secondary " : "primary ") 
: "",

   isClientNotification ? "subscription" : "client");

-  ConnErrType error = sendData(data, msgLengh, connectTimeout, false);

+  // GT GEODE-2891

Do not include comments with your name or the ticket number.



In 
src/cppcache/src/TcrConnection.cpp:

> @@ -318,7 +318,9 @@ bool TcrConnection::InitTcrConnection(

   LOGFINE("Attempting handshake with endpoint %s for %s%s connection", 
endpoint,

   isClientNotification ? (isSecondary ? "secondary " : "primary ") 
: "",

   isClientNotification ? "subscription" : "client");

-  ConnErrType error = sendData(data, msgLengh, connectTimeout, false);

+  // GT GEODE-2891

+  //ConnErrType error = sendData( data, msgLengh, connectTimeout, false );

Do not leave commented out sources, this is what revision control is for.



In 
src/cppcache/src/TcrConnection.cpp:

> -  // then app has set timeout in millis, change it to microSeconds

-  sendTimeoutSec = sendTimeoutSec * 1000;

-  isPublicApiTimeout = true;

-  LOGDEBUG("sendData2 %d ", sendTimeoutSec);

-} else {

-  sendTimeoutSec = sendTimeoutSec * 1000;

-}

+   notPublicApiWithTimeout == 
TcrMessage::EXECUTE_REGION_FUNCTION_SINGLE_HOP ||

+  // GT GEODE-2891

+  notPublicApiWithTimeout == TcrMessage::HANDSHAKE)

+   {

+   // then app has set timeout in millis, change it to microSeconds

+   sendTimeoutSec = sendTimeoutSec * 1000;

+   isPublicApiTimeout = true;

+   LOGDEBUG("sendData2 %d ", sendTimeoutSec);

+   }

Formatting does not conform to Google C++ Style 
Guide.