Disk polling: investigate repeated batch verification and record scanning

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust

調査の方向性

core/partitions/src/poll_plan.rs の walk_disk_chunk、core/partitions/src/journal.rs の select_batch_slice、core/binary_protocol/src/batch.rs の verify_and_recompute_batch_checksum から始めます。#4174 のワークロード全体で、ハッシュ化したバイト数、訪問した records、異なる batches、再訪回数、選択位置を測定し、カウンタは #4175 と共有します。完了の条件は、コストが帰属され、検証または parsing の変更のいずれかが読み取りサイズの変更とは別にテストされ、checksum、validation、malformed frame の拒否、出力、メモリ、identity、invalidation に関する保証が維持されていることです。

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

説明

performance server

Part of #4174, which records the shared benchmark setup, revisions and evaluation criteria.

walk_disk_chunk decodes a complete batch and verifies checksums when enabled. select_batch_slice then walks records to locate the requested slice. Adjacent small polls can revisit the same batch, and selecting a late record can scan preceding records.

Historical profiles measured substantial CPU time in the inclusive checksum and hash category:

Workload Baseline sampled CPU, µs per poll Candidate sampled CPU, µs per poll
Explicit offset, without concurrent writes 100.474 101.810
Explicit offset, with concurrent writes 109.583 110.524

The category includes called functions and overlaps its callers, so it cannot be added to their CPU totals. These samples establish neither repeated verification nor avoidable work. The shared sampling method and workload limits are in #4174.

verify_and_recompute_batch_checksum already validates message bodies and recomputes the batch checksum in one frame walk. Investigate repeated visits and selection costs before assuming a duplicate pass exists.

  1. Count bytes hashed, records visited, distinct batches and repeat visits per returned message. Attribute current hash samples to callers and distinguish verification from record selection.
  2. Vary batch size, requested message count and position within a batch. Determine whether the cost comes from large batches, repeated visits, locating a late record or the hash implementation.
  3. Share counters with #4175, then test one verification or parsing change separately from read sizing. Confirm any component saving through polling, including larger requests and concurrent writes.

Preserve configured checksum and body validation, malformed frame rejection and the parent's output guarantees. A previously verified file range does not establish the integrity of newly read bytes: corruption and path reuse can occur later. Any retained verified buffer needs bounded memory, correct identity and explicit invalidation.

主要言語
Rust
スター
5.2k
フォーク
502
平均マージ
3日 3時間
マージ済み PR(30日)
163

環境構築

Codespaces で開く

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

はじめの一歩

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

apache/iggy のほかの issue

apache/iggy の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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