VCS scanner: one slow connection can stall code-subscription scans for hours

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

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

関連するプルリクエストがすでにマージされています。

  • #2996 @neilv-g による — マージ済み
  • #2998 @neilv-g による — マージ済み

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, google-cloud

調査の方向性

Start by finding the VCS scanner worker and archive download code, then trace how it handles HTTP connections, scan timeouts, concurrency, and Pub/Sub message acknowledgment. Implement the three stated limits: a short-lived connection per download, a 3-minute scan timeout, and at most 20 concurrent scans per worker. Done when tests cover these limits and the reported queue stalls are addressed.

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

説明

bug go

Problem

The Pub/Sub High Latency (prod) alert fired 7 times between Nov 12 and Nov 18 on vcs-scan-tasks-sub-prod. Episodes lasted from 16 minutes to over 6 hours. During each one, repository scans on one worker were delayed by up to an hour, and some scan tasks were silently dropped once they passed the subscription's 1-hour retention.

Why it happens

  • All downloads share one connection. Each scanner worker sends all of its archive downloads over a single shared HTTP/2 connection. Sometimes that connection is slow. New downloads keep arriving before the old ones finish, so the connection never goes idle and is never replaced. It slows every scan on that worker until something resets it.
  • Nothing times out. A stuck download keeps its Pub/Sub message for up to an hour, so the queue backs up and the alert fires.

Fix

  • Give each archive download its own short-lived connection.
  • Time out scans after 3 minutes.
  • Process at most 20 scans at once per worker.

Impact

  • A slow connection affects one download, instead of every scan on a worker for hours.
  • A stuck download is cut off after 3 minutes instead of holding its message for an hour.
主要言語
Go
スター
264
フォーク
65
平均マージ
22時間 28分
マージ済み PR(30日)
75

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

GoogleChrome/webstatus.dev のほかの issue

GoogleChrome/webstatus.dev の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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