[BanyanDB] Stream write callback reports success for events it did not store

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

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

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

  • #1443 @AnKiT-GaRG2 による — マージされずにクローズ

評価

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

調査の方向性

Start with banyand/stream/write_standalone.go, then read the error forwarding paths in banyand/queue/local.go and banyand/queue/sub/helpers.go and how batch statuses are applied in banyand/liaison/grpc/stream.go. Check the corresponding callbacks in banyand/measure and banyand/trace. Done means failures before any event is stored reach the caller, while partial and index-write failures do not cause stored events to be retried as failures.

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

説明

Summary

writeCallback.Rev (banyand/stream/write_standalone.go) logs each failed event and continues, and always returns an empty response. The caller gets STATUS_SUCCEED for elements that were not stored.

For example, for a missing group, handle fails in prepareElementsInGroup (cannot load tsdb for group). Rev logs cannot handle write event and returns no error.

Observed

With native self-stored logs (apache/skywalking-banyandb#1419) on a standalone node, a forced delete of _monitoring_log lost 3 events. native_log_written_total rose for them, and every native_log_dropped_total reason stayed 0.

Notes for a fix

  • The error reply path already exists: localBatchPublisher.Close (banyand/queue/local.go) and the data-node sub server (banyand/queue/sub/helpers.go) forward a *common.Error, as CheckHealth does for disk-full.
  • The liaison applies one status to every message it sent to a node in a batch (banyand/liaison/grpc/stream.go). Reporting an error on a partial failure would mark stored elements as failed, and a retrying client would store them twice. Report an error only when nothing in the batch was stored, or report per element.
  • Index-write failures happen after the elements are stored, so they should stay logged only.
  • banyand/measure and banyand/trace use the same pattern.

Effect on #1419

#1419 does not change this callback. Until it is fixed, events lost while the log destination is missing are counted as written, so a test cannot observe that loss.

主要言語
Java
スター
25k
フォーク
6.6k
平均マージ
12時間 41分
マージ済み PR(30日)
48

環境構築

はじめの一歩

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

apache/skywalking のほかの issue

apache/skywalking の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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