Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[client] OperationTimeoutException should include cause #11233

Closed
pveentjer opened this issue Aug 26, 2017 · 1 comment
Closed

[client] OperationTimeoutException should include cause #11233

pveentjer opened this issue Aug 26, 2017 · 1 comment

Comments

@pveentjer
Copy link
Member

@pveentjer pveentjer commented Aug 26, 2017

Check the arrow below. The original exception isn't attached as cause, so we are loosing very important data!

 public void notifyException(Throwable exception) {
        if (!lifecycleService.isRunning()) {
            clientInvocationFuture.complete(new HazelcastClientNotActiveException(exception.getMessage(), exception));
            return;
        }

        if (isNotAllowedToRetryOnSelection(exception)) {
            clientInvocationFuture.complete(exception);
            return;
        }

        boolean retry = isRetrySafeException(exception)
                || invocationService.isRedoOperation()
                || (exception instanceof TargetDisconnectedException && clientMessage.isRetryable());
        if (!retry) {
            clientInvocationFuture.complete(exception);
            return;
        }

        long remainingMillis = retryExpirationMillis - System.currentTimeMillis();
        if (remainingMillis < 0) {
            if (logger.isFinestEnabled()) {
                logger.finest("Exception will not be retried because invocation timed out", exception);
            }
            clientInvocationFuture.complete(new OperationTimeoutException(this + " timed out by "
                    + Math.abs(remainingMillis) + " ms"));<--------------
            return;
        }

        try {
            executionService.schedule(this, RETRY_WAIT_TIME_IN_SECONDS, TimeUnit.SECONDS);
        } catch (RejectedExecutionException e) {
            clientInvocationFuture.complete(exception);
        }

    }
@pveentjer pveentjer added this to the 3.8.5 milestone Aug 26, 2017
pveentjer added a commit to pveentjer/hazelcast that referenced this issue Aug 27, 2017
pveentjer added a commit to pveentjer/hazelcast that referenced this issue Aug 27, 2017
@pveentjer pveentjer changed the title Client OperationTimeoutException should include cause [client] OperationTimeoutException should include cause Aug 27, 2017
@Donnerbart Donnerbart modified the milestones: 3.9, 3.8.5 Aug 28, 2017
@sancar
Copy link
Member

@sancar sancar commented Aug 29, 2017

fixed via #11238 and #11239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.