TiFlash v8.5.8: MergeDelta repeatedly fails with “invalid field index” after a zero-length partial Page read, including after restart

Đang mở
#11,237 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
backend, databases

Hướng nghiên cứu

Start with the reported read path: Segment::prepareMergeDelta through ColumnFileTiny::fillColumns to Page::getFieldData, then inspect the zero-length branch in BlobStore.cpp around line 891. Compare the persisted PageEntry field offsets with the ColumnFileTiny schema metadata for the referenced Page, using read-only diagnostics before recovery. The issue is resolved when the evidence distinguishes those causes and identifies which Page and schema metadata to preserve.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

contribution

Background MergeDelta repeatedly failed on the same Segment and Page on one TiFlash instance. We counted 2,260 failed attempts in approximately 30 minutes. The same Segment, Page and field-index error appeared again within seconds of a subsequent TiFlash restart.

Environment: TiFlash v8.5.8, engine Git hash reported at restart 3abdec8bff315647a056e6bf910abd4b59af2011, Linux x86-64.

Observed errors (identifiers redacted consistently):

BlobStore.cpp:891
Reading with fields but entry size is 0
  page_id=<TABLE_A>.<PAGE_A>
  fields=[1, 2]
  PageEntry.size=365272
  field_offsets begins with [0, 0, 0, 0, ...]

DeltaMergeStore_InternalBg.cpp:452
Execute task on segment failed, task=MergeDelta
  segment_id=<SEGMENT_A>
  Try to getFieldData with invalid field index
  [page_id=<PAGE_A>] [valid=true] [field_index=2]

Failing read path (selected frames):

Segment::prepareMergeDelta
  → Segment::ensurePlace
  → ColumnFileSetReader::readPKVersion
  → ColumnFileTiny::fillColumns
  → Page::getFieldData(2)

The logged PageEntry had a nonzero total size. The zero-length warning occurred on the partial read for fields [1, 2]. In the corresponding BlobStore source, the zero-length branch returns a Page with empty data and no populated field offsets. This explains the subsequent lookup failure. We have not determined how the stored field offsets were produced.

Observed impact: Across three samples spanning about five and a half minutes, Delta rows on the affected Segment increased by 665, reaching approximately 673,000 rows and 463 MiB. The logical Delta ColumnFile count increased by 425, reaching approximately 226,000. The Segment epoch and Stable row count stayed constant across these samples.

Reproduction: The existing affected replica reproduced the error across a process restart. We do not have a procedure to create the original Page state on a fresh cluster.

What read-only diagnostics would help distinguish a problem in the persisted PageEntry field offsets from a mismatch between ColumnFileTiny schema metadata and the referenced Page? We would also appreciate guidance on which Page and schema metadata to preserve before attempting replica recovery.

Ngôn ngữ chính
C++
Star
1k
Fork
428
Merge trung bình
2 ngày 7 giờ
Pull request đã merge (30 ngày)
100

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pingcap/tiflash

Tất cả issue của pingcap/tiflash

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.