PostgreSQL: index for the AT_TIMESTAMP stream seek needs a data migration
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Start by reading the existing data migration files under crates/storage-postgres/data_migrations/ and the migrations::DATA_MIGRATIONS list. Add a migration for the covering (shard_id, created_at, sequence_number) index, then update the catalog-converge and backup tests that enumerate migrations. Done when those tests include the migration and existing deployments can run extenddb migrate before serving the upgraded binary.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The AT_TIMESTAMP seek on PostgreSQL runs SELECT MIN(sequence_number) FROM stream_records WHERE shard_id = $1 AND created_at >= $2. The planner takes the minimum off the (shard_id, sequence_number) primary key and applies created_at as a heap filter; the global created_at index cannot yield the minimum sequence without a sort, so it is not chosen. With sequence and creation time correlated, a seek near the tip filters the whole shard.
Measured on one shard of 100,000 records with created_at spread over 24 hours: a seek at the start answers in 0.04 ms (first row qualifies), a mid-range seek in 9.46 ms (49,999 rows removed by filter), a seek near the tip in 19.21 ms (99,899 rows removed). Linear in shard size beyond that.
A covering index (shard_id, created_at, sequence_number) gives the minimum directly. It needs a data migration file under crates/storage-postgres/data_migrations/ and an entry in migrations::DATA_MIGRATIONS, which means existing deployments run extenddb migrate before the upgraded binary serves, and the catalog-converge and backup tests that enumerate the migration list need the new file added. That upgrade step is why the index is not part of the feature change; GetShardIterator runs about once per consumer resume, so the cost is tolerable until a hot shard holds millions of records.
MongoDB and SQLite got their (shard_id, created_at) index in the feature change itself, since both create indexes idempotently at startup.
- 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
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ExtendDB/extenddb
-
backend:mongodb bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 2 ngày
-
backend:cassandra bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 2 ngày
-
backend:cassandra bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[storage.cassandra] accepts unknown keys silentlyCó thể đã có người làm @LeeroyHannigan đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ExtendDB/extenddb#540 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của ExtendDB/extenddb
Issue tương tự
-
QuartoHub: have the Document name before the filename in the browser tabCó thể đã có người làm @cscheid đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
quarto-dev/q2#930 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
muse P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
HerringtonDarkholme/hd-lang#923 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
longbridge/gpui-kit#3712 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation enhancement SIEM
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ADORSYS-GIS/wazuh-agent-status#265 ·
Maintainer thường phản hồi trong vòng 2 ngày