[jira] [Updated] (GEODE-10012) Avoid retries for non-HA function execution

2022-02-05 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-10012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated GEODE-10012:
---
Labels: needsTriage pull-request-available  (was: needsTriage)

> Avoid retries for non-HA function execution
> ---
>
> Key: GEODE-10012
> URL: https://issues.apache.org/jira/browse/GEODE-10012
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Mario Salazar de Torres
>Assignee: Mario Salazar de Torres
>Priority: Major
>  Labels: needsTriage, pull-request-available
>
> *GIVEN* a cluster with 3 servers and 1 locator
> *AND* a PartitionedRegion with redundant-copies="1"
> *AND* a user-defined Function with isHA=false
> *AND* a geode-native client with a pool with single-hop enabled and retry 
> attempts set to 2
> *WHEN* execution fails due to a connectivity issue/connection 
> timeout/internal cluster error
> *THEN* function is retried twice
> 
> *Additional information.* The function is retried at the network code layer, 
> and given whenever there is a timeout/connectivity error, the BSL is removed 
> from the ClientMetadataService, whenever retries happen, you might get a 
> *InternalFunctionInvocationTargetException* exception thrown indicating: 
> {code:java}
> Multiple target nodes found for single hop operation {code}
> Also, have into account that Java client API behaviour never retries a 
> Function Execution if isHA=false for that function, and whenever isHA=true, 
> the function is retried but on the function execution logic and not at the 
> networking layer.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (GEODE-10012) Avoid retries for non-HA function execution

2022-02-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on GEODE-10012:


gaussianrecurrence opened a new pull request #920:
URL: https://github.com/apache/geode-native/pull/920


- Currently, in the native client, if you configure retryAttemps to be >0 
for your pool, non-HA function executions are retried. 
   This happens as retry are coded in the network layer.
- Geode documentation states that retries should happen for functions
  which isHA=true and in the function execution logic. And this is how
  it works in the Java client API.
- If a function is retried at the network layer, it could happen that 
- So, this commit changes the behavior, so non-HA functions are not
  retried.
- Also, FunctionAttributes were introduced in order to improve code
  readability.
- Moved function execution classes to a file of its own, in order to
  improve readability and modularity.
- Solved a bug in which there could not exist 2 functions with the same
  name, defined on different clusters and with different function
  attributes.
- Implemented several new ITs to test that non-HA function executions are 
not
  retried by the API.
- These are the cases being tested:
   * Function execution with PR enabled:
 - A timeout is forced from the server-side, so the server closes
   the connection towards the client.
 - A timeout is forced in the client.
   * Function execution with PR disabled.
   
   
   Co-authored-by: Jakov Varenina 
   


-- 
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: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Avoid retries for non-HA function execution
> ---
>
> Key: GEODE-10012
> URL: https://issues.apache.org/jira/browse/GEODE-10012
> Project: Geode
>  Issue Type: Bug
>  Components: native client
>Reporter: Mario Salazar de Torres
>Assignee: Mario Salazar de Torres
>Priority: Major
>  Labels: needsTriage
>
> *GIVEN* a cluster with 3 servers and 1 locator
> *AND* a PartitionedRegion with redundant-copies="1"
> *AND* a user-defined Function with isHA=false
> *AND* a geode-native client with a pool with single-hop enabled and retry 
> attempts set to 2
> *WHEN* execution fails due to a connectivity issue/connection 
> timeout/internal cluster error
> *THEN* function is retried twice
> 
> *Additional information.* The function is retried at the network code layer, 
> and given whenever there is a timeout/connectivity error, the BSL is removed 
> from the ClientMetadataService, whenever retries happen, you might get a 
> *InternalFunctionInvocationTargetException* exception thrown indicating: 
> {code:java}
> Multiple target nodes found for single hop operation {code}
> Also, have into account that Java client API behaviour never retries a 
> Function Execution if isHA=false for that function, and whenever isHA=true, 
> the function is retried but on the function execution logic and not at the 
> networking layer.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (GEODE-10016) Use Thread Name In Log Messages

2022-02-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on GEODE-10016:


mmartell commented on a change in pull request #918:
URL: https://github.com/apache/geode-native/pull/918#discussion_r800104741



##
File path: cppcache/src/DistributedSystemImpl.cpp
##
@@ -38,6 +38,10 @@
 #include "util/Log.hpp"
 #include "version.h"
 
+namespace {
+std::map m_threadNames;

Review comment:
   Good catch.




-- 
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: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Use Thread Name In Log Messages
> ---
>
> Key: GEODE-10016
> URL: https://issues.apache.org/jira/browse/GEODE-10016
> Project: Geode
>  Issue Type: Improvement
>  Components: native client
>Reporter: Michael Martell
>Priority: Minor
>  Labels: pull-request-available
>
> The native client logging system currently prints the threadId in all log 
> messages. Since all internally created native client threads are named, we 
> should print the threadName instead of threadId. This will be extremely 
> helpful to understanding the flow of messages since there are many background 
> threads in the native client.
> Note: Lots of log messages are running on an application thread which was not 
> created internally by the native client. Messages running on these threads 
> should continue to print the threadId.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (GEODE-10016) Use Thread Name In Log Messages

2022-02-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on GEODE-10016:


mmartell commented on a change in pull request #918:
URL: https://github.com/apache/geode-native/pull/918#discussion_r800104808



##
File path: cppcache/src/DistributedSystemImpl.cpp
##
@@ -143,11 +147,24 @@ void DistributedSystemImpl::unregisterCliCallback(int 
appdomainId) {
   }
 }
 
-void DistributedSystemImpl::setThreadName(const std::string& threadName) {
+std::string DistributedSystemImpl::getThreadName(std::thread::id id) {
+  std::string threadName = m_threadNames[id];
+  if (threadName == "") {
+std::stringstream ss;
+ss << id;
+threadName = ss.str();
+  }
+  return threadName;
+}
+
+void DistributedSystemImpl::setThreadName(const std::string& threadName,

Review comment:
   Good catch.




-- 
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: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Use Thread Name In Log Messages
> ---
>
> Key: GEODE-10016
> URL: https://issues.apache.org/jira/browse/GEODE-10016
> Project: Geode
>  Issue Type: Improvement
>  Components: native client
>Reporter: Michael Martell
>Priority: Minor
>  Labels: pull-request-available
>
> The native client logging system currently prints the threadId in all log 
> messages. Since all internally created native client threads are named, we 
> should print the threadName instead of threadId. This will be extremely 
> helpful to understanding the flow of messages since there are many background 
> threads in the native client.
> Note: Lots of log messages are running on an application thread which was not 
> created internally by the native client. Messages running on these threads 
> should continue to print the threadId.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (GEODE-10016) Use Thread Name In Log Messages

2022-02-05 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot commented on GEODE-10016:


mmartell commented on a change in pull request #918:
URL: https://github.com/apache/geode-native/pull/918#discussion_r800104791



##
File path: cppcache/src/DistributedSystemImpl.cpp
##
@@ -143,11 +147,24 @@ void DistributedSystemImpl::unregisterCliCallback(int 
appdomainId) {
   }
 }
 
-void DistributedSystemImpl::setThreadName(const std::string& threadName) {
+std::string DistributedSystemImpl::getThreadName(std::thread::id id) {

Review comment:
   Good catch! You're right. Don't need to pass in threadId.




-- 
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: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Use Thread Name In Log Messages
> ---
>
> Key: GEODE-10016
> URL: https://issues.apache.org/jira/browse/GEODE-10016
> Project: Geode
>  Issue Type: Improvement
>  Components: native client
>Reporter: Michael Martell
>Priority: Minor
>  Labels: pull-request-available
>
> The native client logging system currently prints the threadId in all log 
> messages. Since all internally created native client threads are named, we 
> should print the threadName instead of threadId. This will be extremely 
> helpful to understanding the flow of messages since there are many background 
> threads in the native client.
> Note: Lots of log messages are running on an application thread which was not 
> created internally by the native client. Messages running on these threads 
> should continue to print the threadId.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)