Github user sbawaska commented on a diff in the pull request:
https://github.com/apache/incubator-geode/pull/13#discussion_r36257113
--- Diff:
gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/ExecutionHandlerContext.java
---
@@ -179,31 +203,21 @@ public void executeCommand(ChannelHandlerContext ctx,
Command command) throws Ex
*
* @param exec Executor to use
* @param command Command to execute
- * @param cache Cache instance
- * @param client Client data associated with client
- * @param n Recursive max depth of retries
* @throws Exception Throws exception if exception is from within
execution and not to be handled
*/
- private void executeWithoutTransaction(final Executor exec, Command
command, int n) throws Exception {
- try {
- exec.executeCommand(command, this);
- } catch (RegionDestroyedException e) {
- if (n > 0)
- executeWithoutTransaction(exec, command, n - 1);
- else
- throw e;
+ private void executeWithoutTransaction(final Executor exec, Command
command) throws Exception {
+ for (int i = 0; i < MAXIMUM_NUM_RETRIES; i++) {
+ try {
+ exec.executeCommand(command, this);
+ return;
+ } catch (Exception e) {
+ if (e instanceof RegionDestroyedException || e.getCause()
instanceof QueryInvocationTargetException)
+ Thread.sleep(WAIT_REGION_DSTRYD_MILLIS);
+ }
}
+ throw new Exception("Could not execute command");
--- End diff --
Can you please re-throw the underlying exception here.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---