[jira] [Commented] (THRIFT-3060) Node.js client retry logic doesn't flush offline queue on reconnect
[ https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16336683#comment-16336683 ] ASF GitHub Bot commented on THRIFT-3060: Github user asfgit closed the pull request at: https://github.com/apache/thrift/pull/395 > Node.js client retry logic doesn't flush offline queue on reconnect > --- > > Key: THRIFT-3060 > URL: https://issues.apache.org/jira/browse/THRIFT-3060 > Project: Thrift > Issue Type: Bug > Components: Node.js - Library >Affects Versions: 0.9.2 >Reporter: Chris Thompson >Priority: Minor > Attachments: thrift-3060-fix_retry_logic.patch > > > The Node.js client includes retry logic in case the connection terminates > unexpectedly. On reconnect, the `offline_queue` variable never gets reset, > so any requests still in the queue will get processed on every reconnect. > In addition, the variables the keep track of the retry state are not > initialized prior to a successful connection, meaning that if the initial > connection doesn't succeed, that the retry timer is set to `NaN` and doesn't > work as expected. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-3060) Node.js client retry logic doesn't flush offline queue on reconnect
[ https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16336663#comment-16336663 ] ASF GitHub Bot commented on THRIFT-3060: Github user jeking3 commented on the issue: https://github.com/apache/thrift/pull/395 This pull request is being closed due to lack of activity. You can re-open it after rebasing on the current master if you would like it to be reconsidered. > Node.js client retry logic doesn't flush offline queue on reconnect > --- > > Key: THRIFT-3060 > URL: https://issues.apache.org/jira/browse/THRIFT-3060 > Project: Thrift > Issue Type: Bug > Components: Node.js - Library >Affects Versions: 0.9.2 >Reporter: Chris Thompson >Priority: Minor > Attachments: thrift-3060-fix_retry_logic.patch > > > The Node.js client includes retry logic in case the connection terminates > unexpectedly. On reconnect, the `offline_queue` variable never gets reset, > so any requests still in the queue will get processed on every reconnect. > In addition, the variables the keep track of the retry state are not > initialized prior to a successful connection, meaning that if the initial > connection doesn't succeed, that the retry timer is set to `NaN` and doesn't > work as expected. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (THRIFT-3060) Node.js client retry logic doesn't flush offline queue on reconnect
[ https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15042581#comment-15042581 ] ASF GitHub Bot commented on THRIFT-3060: Github user nsuke commented on a diff in the pull request: https://github.com/apache/thrift/pull/395#discussion_r46751947 --- Diff: lib/nodejs/lib/thrift/connection.js --- @@ -209,10 +205,9 @@ Connection.prototype.connection_gone = function () { this.connected = false; this.ready = false; + this.retry_delay = Math.floor(this.retry_delay * this.retry_backoff); --- End diff -- Is there good reason to change the initial timeout value and also `retry_backoff` 1.7 -> 1.5 ? > Node.js client retry logic doesn't flush offline queue on reconnect > --- > > Key: THRIFT-3060 > URL: https://issues.apache.org/jira/browse/THRIFT-3060 > Project: Thrift > Issue Type: Bug > Components: Node.js - Library >Affects Versions: 0.9.2 >Reporter: Chris Thompson >Priority: Minor > Attachments: thrift-3060-fix_retry_logic.patch > > > The Node.js client includes retry logic in case the connection terminates > unexpectedly. On reconnect, the `offline_queue` variable never gets reset, > so any requests still in the queue will get processed on every reconnect. > In addition, the variables the keep track of the retry state are not > initialized prior to a successful connection, meaning that if the initial > connection doesn't succeed, that the retry timer is set to `NaN` and doesn't > work as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3060) Node.js client retry logic doesn't flush offline queue on reconnect
[ https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15042589#comment-15042589 ] ASF GitHub Bot commented on THRIFT-3060: Github user nsuke commented on the pull request: https://github.com/apache/thrift/pull/395#issuecomment-162132438 I don't understand well the original motivation for clearing the queue. It seems to me, if the user calls some RPC methods it should be either done or error. They should not be silently ignored on random automatic reconnects. If the disconnect is because of erroneous RPC input, the caller is responsible for properly re-initializing client. Am I missing something ? > Node.js client retry logic doesn't flush offline queue on reconnect > --- > > Key: THRIFT-3060 > URL: https://issues.apache.org/jira/browse/THRIFT-3060 > Project: Thrift > Issue Type: Bug > Components: Node.js - Library >Affects Versions: 0.9.2 >Reporter: Chris Thompson >Priority: Minor > Attachments: thrift-3060-fix_retry_logic.patch > > > The Node.js client includes retry logic in case the connection terminates > unexpectedly. On reconnect, the `offline_queue` variable never gets reset, > so any requests still in the queue will get processed on every reconnect. > In addition, the variables the keep track of the retry state are not > initialized prior to a successful connection, meaning that if the initial > connection doesn't succeed, that the retry timer is set to `NaN` and doesn't > work as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3060) Node.js client retry logic doesn't flush offline queue on reconnect
[ https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15042574#comment-15042574 ] ASF GitHub Bot commented on THRIFT-3060: Github user nsuke commented on the pull request: https://github.com/apache/thrift/pull/395#issuecomment-162127656 Hi @cjthompson, thanks for the reminder. SSL does not seem to work with this change: https://travis-ci.org/apache/thrift/jobs/56435212#L7581 https://travis-ci.org/apache/thrift/jobs/56435202#L5448 Could you look into this ? > Node.js client retry logic doesn't flush offline queue on reconnect > --- > > Key: THRIFT-3060 > URL: https://issues.apache.org/jira/browse/THRIFT-3060 > Project: Thrift > Issue Type: Bug > Components: Node.js - Library >Affects Versions: 0.9.2 >Reporter: Chris Thompson >Priority: Minor > Attachments: thrift-3060-fix_retry_logic.patch > > > The Node.js client includes retry logic in case the connection terminates > unexpectedly. On reconnect, the `offline_queue` variable never gets reset, > so any requests still in the queue will get processed on every reconnect. > In addition, the variables the keep track of the retry state are not > initialized prior to a successful connection, meaning that if the initial > connection doesn't succeed, that the retry timer is set to `NaN` and doesn't > work as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3060) Node.js client retry logic doesn't flush offline queue on reconnect
[ https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15042583#comment-15042583 ] ASF GitHub Bot commented on THRIFT-3060: Github user nsuke commented on a diff in the pull request: https://github.com/apache/thrift/pull/395#discussion_r46752076 --- Diff: lib/nodejs/lib/thrift/connection.js --- @@ -182,10 +170,18 @@ Connection.prototype.initialize_retry_vars = function () { this.retry_timer = null; this.retry_totaltime = 0; this.retry_delay = 150; - this.retry_backoff = 1.7; + this.retry_backoff = 1.5; this.attempts = 0; }; +Connection.prototype.flushQueue = function () { + var current_queue = this.offline_queue.slice(); --- End diff -- I don't think we need a copy here since we're throwing away the old one right away. > Node.js client retry logic doesn't flush offline queue on reconnect > --- > > Key: THRIFT-3060 > URL: https://issues.apache.org/jira/browse/THRIFT-3060 > Project: Thrift > Issue Type: Bug > Components: Node.js - Library >Affects Versions: 0.9.2 >Reporter: Chris Thompson >Priority: Minor > Attachments: thrift-3060-fix_retry_logic.patch > > > The Node.js client includes retry logic in case the connection terminates > unexpectedly. On reconnect, the `offline_queue` variable never gets reset, > so any requests still in the queue will get processed on every reconnect. > In addition, the variables the keep track of the retry state are not > initialized prior to a successful connection, meaning that if the initial > connection doesn't succeed, that the retry timer is set to `NaN` and doesn't > work as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3060) Node.js client retry logic doesn't flush offline queue on reconnect
[ https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15038017#comment-15038017 ] Chris Thompson commented on THRIFT-3060: Is there any reason for not accepting this patch? > Node.js client retry logic doesn't flush offline queue on reconnect > --- > > Key: THRIFT-3060 > URL: https://issues.apache.org/jira/browse/THRIFT-3060 > Project: Thrift > Issue Type: Bug > Components: Node.js - Library >Affects Versions: 0.9.2 >Reporter: Chris Thompson >Priority: Minor > Attachments: thrift-3060-fix_retry_logic.patch > > > The Node.js client includes retry logic in case the connection terminates > unexpectedly. On reconnect, the `offline_queue` variable never gets reset, > so any requests still in the queue will get processed on every reconnect. > In addition, the variables the keep track of the retry state are not > initialized prior to a successful connection, meaning that if the initial > connection doesn't succeed, that the retry timer is set to `NaN` and doesn't > work as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3060) Node.js client retry logic doesn't flush offline queue on reconnect
[ https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15038021#comment-15038021 ] ASF GitHub Bot commented on THRIFT-3060: Github user cjthompson commented on the pull request: https://github.com/apache/thrift/pull/395#issuecomment-161700301 Is there any reason to not include this patch? > Node.js client retry logic doesn't flush offline queue on reconnect > --- > > Key: THRIFT-3060 > URL: https://issues.apache.org/jira/browse/THRIFT-3060 > Project: Thrift > Issue Type: Bug > Components: Node.js - Library >Affects Versions: 0.9.2 >Reporter: Chris Thompson >Priority: Minor > Attachments: thrift-3060-fix_retry_logic.patch > > > The Node.js client includes retry logic in case the connection terminates > unexpectedly. On reconnect, the `offline_queue` variable never gets reset, > so any requests still in the queue will get processed on every reconnect. > In addition, the variables the keep track of the retry state are not > initialized prior to a successful connection, meaning that if the initial > connection doesn't succeed, that the retry timer is set to `NaN` and doesn't > work as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3060) Node.js client retry logic doesn't flush offline queue on reconnect
[ https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14386927#comment-14386927 ] ASF GitHub Bot commented on THRIFT-3060: Github user cjthompson commented on the pull request: https://github.com/apache/thrift/pull/395#issuecomment-87740047 I submitted a patch to issue THRIFT-3060. Node.js client retry logic doesn't flush offline queue on reconnect --- Key: THRIFT-3060 URL: https://issues.apache.org/jira/browse/THRIFT-3060 Project: Thrift Issue Type: Bug Components: Node.js - Library Affects Versions: 0.9.2 Reporter: Chris Thompson Priority: Minor Attachments: thrift-3060-fix_retry_logic.patch The Node.js client includes retry logic in case the connection terminates unexpectedly. On reconnect, the `offline_queue` variable never gets reset, so any requests still in the queue will get processed on every reconnect. In addition, the variables the keep track of the retry state are not initialized prior to a successful connection, meaning that if the initial connection doesn't succeed, that the retry timer is set to `NaN` and doesn't work as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (THRIFT-3060) Node.js client retry logic doesn't flush offline queue on reconnect
[ https://issues.apache.org/jira/browse/THRIFT-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14386926#comment-14386926 ] Chris Thompson commented on THRIFT-3060: See GitHub PR : https://github.com/apache/thrift/pull/395 Node.js client retry logic doesn't flush offline queue on reconnect --- Key: THRIFT-3060 URL: https://issues.apache.org/jira/browse/THRIFT-3060 Project: Thrift Issue Type: Bug Components: Node.js - Library Affects Versions: 0.9.2 Reporter: Chris Thompson Priority: Minor Attachments: thrift-3060-fix_retry_logic.patch The Node.js client includes retry logic in case the connection terminates unexpectedly. On reconnect, the `offline_queue` variable never gets reset, so any requests still in the queue will get processed on every reconnect. In addition, the variables the keep track of the retry state are not initialized prior to a successful connection, meaning that if the initial connection doesn't succeed, that the retry timer is set to `NaN` and doesn't work as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)