total_retry_time is not "time since last connect"

Aperta
#1,421 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
node.js, typescript
Ambito
backend

Direzione di ricerca

Inizia dal callback retry_strategy e traccia come viene calcolato total_retry_time durante il timeout della connessione mostrato nel report. Riproduci su NodeJS la sequenza temporale registrata, quindi verifica che il valore riportato includa sia il tempo trascorso dalla connessione al timeout sia le attese tra i retry.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

  • 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...

Lingua principale
TypeScript
Stelle
17.6k
Fork
2k
Merge medio
1g 22h
PR unite (30g)
62

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di redis/node-redis

Tutte le issue di redis/node-redis

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.