total_retry_time is not "time since last connect"

オープン
#1,421 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
node.js, typescript
領域
backend

調査の方向性

retry_strategy コールバックから開始し、レポートに示された接続タイムアウト中に total_retry_time がどのように計算されるかを追跡します。NodeJS で記録されたタイミングのシーケンスを再現し、その後、報告された値に接続からタイムアウトまでの経過時間と retry の待機時間の両方が含まれていることを確認します。

索引モデルが issue の本文から書いたものです。

説明

  • Version: 2.8.0
  • Platform: NodeJS 11.12 on Windows 10
  • Description:
    total_retry_time is not "time since last connect", it's just total time of waiting for retry, time from connect to timeout was ignored.

Here is my log with real time and time passed to retry_strategy:

{"name":"App","hostname":"Desktop","pid":28432,"level":50,"msg":"[RedisClient] Redis losted connection, time since last connect: 0 { attempt: 1,\n  error:\n   { Error: Redis connection to redis:6379 failed - connect ETIMEDOUT 192.168.31.25:6379\n       at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1083:14)\n     errno: 'ETIMEDOUT',\n     code: 'ETIMEDOUT',\n     syscall: 'connect',\n     address: '192.168.31.25',\n     port: 6379 },\n  total_retry_time: 0,\n  times_connected: 0 }","time":"2019-03-18T08:25:38.402Z","v":0}
{"name":"App","hostname":"Desktop","pid":28432,"level":50,"msg":"[RedisClient] Redis losted connection, time since last connect: 10 { attempt: 2,\n  error:\n   { Error: Redis connection to redis:6379 failed - connect ETIMEDOUT 192.168.31.25:6379\n       at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1083:14)\n     errno: 'ETIMEDOUT',\n     code: 'ETIMEDOUT',\n     syscall: 'connect',\n     address: '192.168.31.25',\n     port: 6379 },\n  total_retry_time: 10,\n  times_connected: 0 }","time":"2019-03-18T08:25:59.424Z","v":0}
{"name":"App","hostname":"Desktop","pid":28432,"level":50,"msg":"[RedisClient] Redis losted connection, time since last connect: 20 { attempt: 3,\n  error:\n   { Error: Redis connection to redis:6379 failed - connect ETIMEDOUT 192.168.31.25:6379\n       at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1083:14)\n     errno: 'ETIMEDOUT',\n     code: 'ETIMEDOUT',\n     syscall: 'connect',\n     address: '192.168.31.25',\n     port: 6379 },\n  total_retry_time: 20,\n  times_connected: 0 }","time":"2019-03-18T08:26:20.448Z","v":0}
{"name":"App","hostname":"Desktop","pid":28432,"level":50,"msg":"[RedisClient] Redis losted connection, time since last connect: 30 { attempt: 4,\n  error:\n   { Error: Redis connection to redis:6379 failed - connect ETIMEDOUT 192.168.31.25:6379\n       at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1083:14)\n     errno: 'ETIMEDOUT',\n     code: 'ETIMEDOUT',\n     syscall: 'connect',\n     address: '192.168.31.25',\n     port: 6379 },\n  total_retry_time: 30,\n  times_connected: 0 }","time":"2019-03-18T08:26:41.469Z","v":0}

The documents says it's milliseconds since last connect, but when the callback called with "total_retry_time: 30", 1 minutes was passed...

主要言語
TypeScript
スター
17.6k
フォーク
2k
平均マージ
1日 22時間
マージ済み PR(30日)
62

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

redis/node-redis のほかの issue

redis/node-redis の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。