Remove the XTDB_GENERATE_SERIES_END_EXCLUSIVE escape hatch

Đang mở
#6,486 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
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
databases

Hướng nghiên cứu

Start with core/src/main/clojure/xtdb/sql.clj and src/test/clojure/xtdb/sql/generate_series_test.clj to trace the environment variable read and its effect on visitGenerateSeries; then review the v2.2 changelog in docs/src/content/docs/reference/main/stdlib/table.md. The issue identifies the removal and test cleanup, but the target release and whether startup should warn or fail are unresolved; done means the setting is removed, tests reflect the fixed semantics, and the removing release explains migration to RANGE.

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

Mô tả

breaking change sql

v2.2.0 made GENERATE_SERIES end-inclusive and kept end-exclusive behaviour under RANGE (47660d6fbd, #5382). To cover the upgrade, that commit also added a node-level escape hatch, XTDB_GENERATE_SERIES_END_EXCLUSIVE=true, which reverts GENERATE_SERIES to its pre-2.2 semantics. The commit was explicit that this is "migration cover, not a long-lived setting": anyone who wants end-exclusive for good should be on RANGE. Nothing tracks taking it out, so this card does.

Current state

  • xtdb.sql/*generate-series-end-exclusive?* (core/src/main/clojure/xtdb/sql.clj) reads the env var at namespace load.
  • visitGenerateSeries ANDs it into inclusive?, so with the flag set GENERATE_SERIES plans identically to RANGE.
  • test-end-exclusive-escape-hatch in src/test/clojure/xtdb/sql/generate_series_test.clj pins the flag's behaviour via sql/plan.
  • The v2.2 changelog in docs/src/content/docs/reference/main/stdlib/table.md lists the env var as an upgrade step.

Future state

  • GENERATE_SERIES is always end-inclusive and RANGE always end-exclusive, decided purely by which keyword was parsed.
  • The dynamic var, the env-var read and the escape-hatch test are gone.
  • The changelog entry for the release that removes it says so, and points anyone still setting the env var at RANGE.

Constraints

  • This is a user-facing break. The env var shipped in v2.2.0, so a node that still sets it silently flips GENERATE_SERIES back to inclusive on upgrade, with no error. The removal belongs in a minor release, not a patch, and needs breaking change plus a ! commit.

Open questions

  • Which release drops it? Needs enough of a window after v2.2.0 for users to have migrated to RANGE.
  • Should a node that still sets XTDB_GENERATE_SERIES_END_EXCLUSIVE fail loudly (or at least warn) at startup, rather than being silently ignored?

Progress

Status: not started

  • Remove *generate-series-end-exclusive?* and its use in visitGenerateSeries
  • Remove test-end-exclusive-escape-hatch
  • Changelog entry in stdlib/table.md for the removing release
Ngôn ngữ chính
Clojure
Star
3.1k
Fork
193
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
73

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 xtdb/xtdb

Tất cả issue của xtdb/xtdb

Issue tương tự

Thêm issue về Clojure

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.