Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

MongoDB: a TTL enable whose index build lands after DeleteTable dropped the collection recreates it

Đang mở
#605 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 2 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
48/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ệ
mongodb, rust
Lĩnh vực
database

Hướng nghiên cứu

Start by tracing the MongoDB UpdateTimeToLive enable path through update_ttl and create_ttl_index, then compare its catalog reads and index build with DeleteTable's collection drop. The issue points to worker_store.rs reconciliation and list_collection_names as relevant investigation entry points. Done means the race no longer leaves an orphaned data collection; reproduce the reported interleaving and confirm no orphan remains.

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

Mô tả

backend:mongodb bug

Summary

On MongoDB, UpdateTimeToLive enable runs update_ttl on the catalog document, then create_ttl_index, which reads the document and runs create_index on _ddb_<table_id>. A DeleteTable that marks the document and drops the collection between those two steps lets create_index create the collection again to hold the index; the delete then removes the only document that names it, and nothing sweeps orphaned data collections.

Measured (MongoDB 7, single-node replica set, 2026-10-26)

DeleteTable and UpdateTimeToLive enable raced through the API, twenty rounds per build: an orphaned _ddb_<id> collection with idx_ttl_ttl after 4 of 20 rounds on main. With #599 (no index DDL for a document read as DELETING, and an ACTIVE filter on create_ttl_index's catalog read) the window narrows to a catalog read taken before the mark with the create_index after the drop: 1 of 20 in one run and 0 of 80 in another.

Notes

The remaining case needs the collection drop and the index build to be ordered, or a sweep for data collections with no catalog document (worker_store.rs reconciles CREATING to ACTIVE only). list_collection_names on the data database shows the orphan.

Ngôn ngữ chính
Rust
Star
517
Fork
60
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
25

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

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 ExtendDB/extenddb

Tất cả issue của ExtendDB/extenddb

Issue tương tự

Thêm issue về Rust

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.