Server crash (nil pointer in collationCompare) when filtering dolt_diff by a text primary key
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
- 25/100
Hướng nghiên cứu
Start by reproducing the setup SQL and the w.to_id <> 'r5' filter against dolt_diff on a text primary key. The nil dereference is in schema.collationCompare, reached from prolly.Range.belowStop and prolly.RangeDiffMaps in the diff iterator, so read how the collation is passed into those range checks. Done means the filter returns a count of 1 without the server exiting, and the uuid and cast-to-text cases still behave the same.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Doltgres version: 1.5.1
Setup, on a fresh database:
CREATE TABLE objects (id text PRIMARY KEY, body text);
INSERT INTO objects VALUES ('r5', 'a'), ('r6', 'b');
SELECT dolt_commit('-Am', 'base');
UPDATE objects SET body = 'c' WHERE id = 'r6';
Then, with <base> the hash of the commit above:
SELECT count(*) FROM dolt_diff('<base>', 'WORKING', 'objects') AS w WHERE w.to_id <> 'r5';
Expected: one row, with a count of 1.
Actual: the server process exits, and every open session is disconnected. The log shows a nil pointer dereference in schema.collationCompare, reached from prolly.Range.belowStop and prolly.RangeDiffMaps in the diff iterator.
Other shapes on the same table (for the commit-to-commit rows, also run SELECT dolt_commit('-Am', 'head'); after the update):
filter on dolt_diff(...) AS w |
result |
|---|---|
none (LIMIT $1), WORKING, commit to commit, or STAGED |
served |
w.to_id = 'r5', w.to_id = $1, w.from_id = 'r5' |
XX000 recovered panic; the server stays up |
correlated NOT EXISTS (SELECT 1 FROM dolt_diff(...) d WHERE d.to_id = h.id) |
XX000 "DoltgresHandler caught panic: nil pointer dereference" |
w.to_id <> 'r5', WORKING or commit to commit |
server process exits |
w.diff_type <> 'removed' AND w.to_id NOT IN ($1) |
server process exits |
w.to_id::text IS NOT DISTINCT FROM s.to_id::text (correlated) |
served |
dolt_history_objects WHERE id = $1 |
served |
With a uuid primary key, the same <>, = and NOT IN filters are served. Casting the key column to text before comparing avoids the panic.
- Ngôn ngữ chính
- Go
- Star
- 2.2k
- Fork
- 93
- Merge trung bình
- 19 giờ 38 phút
- Pull request đã merge (30 ngày)
- 132
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không 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 dolthub/doltgresql
-
customer issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
dolthub/doltgresql#3969 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`CREATE TABLE ... TABLESPACE pg_default` fails: TABLESPACE is not yet supportedCó thể đã có người làm @draarivpatel-ui đã nhận 1 ngày trước. Đang mởcustomer issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
dolthub/doltgresql#3818 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
customer issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
dolthub/doltgresql#3817 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
customer issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
dolthub/doltgresql#3979 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
customer issue
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
dolthub/doltgresql#3978 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của dolthub/doltgresql
Issue tương tự
-
good first issue spec
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Go - Inconsistent Logs StabilityĐang mởdocs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
open-telemetry/opentelemetry.io#12846 ·
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 72/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 62/100
hivecommons/hive#19912 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày