You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/27 12:43:04 UTC
[jira] [Commented] (CAMEL-11212) Don't allow Salesforce HTTP client
to stop with outstanding requests
[ https://issues.apache.org/jira/browse/CAMEL-11212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986528#comment-15986528 ]
ASF GitHub Bot commented on CAMEL-11212:
----------------------------------------
GitHub user zregvart opened a pull request:
https://github.com/apache/camel/pull/1666
CAMEL-11212 Don't allow Salesforce HTTP client to stop with outstanding requests
Submitted for review, it seems trivial but could have repercussions if I missed the locking semantics.
Thank you for taking a look 🥇
This introduces a `Phaser` to await for any in-flight requests to complete before the client is allowed to stop.
This should not block as long as the `BufferingResponseListener::onComplete` is invoked at the end of every request. And that is guaranteed by the `CompleteListener::onComplete` contract.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zregvart/camel CAMEL-11212
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1666.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1666
----
commit e5b137d4b2ec9371a6f8a0a7fca3849730127302
Author: Zoran Regvart <zr...@apache.org>
Date: 2017-04-27T12:40:18Z
CAMEL-11212 Don't allow Salesforce HTTP client ...
...to stop with outstanding requests
This introduces a `Phaser` to await for any in-flight requests to
complete before the client is allowed to stop.
This should not block as long as the
`BufferingResponseListener::onComplete` is invoked at the end of every
request. And that is guaranteed by the `CompleteListener::onComplete`
contract.
----
> Don't allow Salesforce HTTP client to stop with outstanding requests
> --------------------------------------------------------------------
>
> Key: CAMEL-11212
> URL: https://issues.apache.org/jira/browse/CAMEL-11212
> Project: Camel
> Issue Type: Bug
> Components: camel-salesforce
> Reporter: Zoran Regvart
> Assignee: Zoran Regvart
> Fix For: 2.20.0, 2.19.1
>
>
> The Salesforce component uses Jetty asynchronous client throughout. There is a race condition that might occur if the component's HTTP client is stopped while one or more requests are still in progress. The result of which could be inconsistencies in execution.
> This was seen in the implementation of the connectivity validation in the ping check which creates the {{SalesforceHttpClient}} and {{DefaultRestClient}} and starts/stops then in a small time frame.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)