[PPL] Limit retained jobs and retained-result bytes for asynchronous queries

Đang mở
#5,804 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

@penghuo đang làm issue này rồi.

Từ ngày 30/10/2026.

  • #24 của @penghuo — đang mở

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
api, backend

Hướng nghiên cứu

Start with follow-up #5765 and the existing AsyncQueryExecution contract. Work out the per-node budget, byte measurement, terminal behavior, and exactly-once reserve/release paths across completion, DELETE, expiration, startup abort, owner shutdown, and races. Done means metrics and concurrency tests cover retained-byte usage and rejected retention without changing the execution contract.

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

Mô tả

async enhancement PPL

Follow-up to #5765.

Problem

The first asynchronous PPL API implementation does not limit how many finished jobs a node retains, and relies on plugins.query.size_limit for row count. Neither bounds the retained jobs or their bytes. A successful retained job keeps its result object graph reachable until DELETE, expiration, or shutdown, so a small number of wide rows or large string values can consume substantial heap. plugins.query.memory_limit protects execution-time heap pressure but does not account for retained results.

Scope

  • Limit how many finished jobs a node retains for polling (plugins.ppl.async.max_retained_jobs). A submit gets 429 while the limit is reached.
  • Define a per-node retained-result byte budget and setting.
  • Define the byte measurement used for admission (for example, serialized result size versus an explicit heap estimate).
  • Define terminal job behavior when a completed result cannot be retained within the budget.
  • Reserve and release capacity exactly once across completion, DELETE, expiration, startup abort, owner shutdown, and races between them.
  • Add metrics and concurrency tests for retained-byte usage and rejected retention.
  • Preserve the existing AsyncQueryExecution contract; execution producers should not depend on lifecycle retention policy.

Out of scope

Result paging or delta delivery remains separate work.

Ngôn ngữ chính
Java
Star
175
Fork
236
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
40

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 opensearch-project/sql

Tất cả issue của opensearch-project/sql

Issue tương tự

Thêm issue về Java

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.