[Enhancement] ControllerClosure request-completion semantics lack direct tests
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- distributed-systems, testing
Hướng nghiên cứu
Bắt đầu bằng việc đọc ControllerClosure.java trong controller/src/main/java/org/apache/rocketmq/controller/impl/closure/ và ghi chú cách nó xây dựng phản hồi từ ControllerResult khi Status là OK, cách ánh xạ lỗi sang CONTROLLER_JRAFT_INTERNAL_ERROR, và cách lưu đệm Task lấy từ taskWithThisClosure(). Thêm một lớp kiểm thử mới trong cây thư mục test của module controller bao phủ ba hành vi đó, dùng DLedgerControllerTest làm chuẩn cho phần thiết lập. Hoàn thành khi các trường hợp OK, lỗi và lưu đệm Task đều vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
ControllerClosure (controller/src/main/java/org/apache/rocketmq/controller/impl/closure/ControllerClosure.java) decides how every JRaft-driven controller request completes:
- on
Status#isOk, it builds the response from theControllerResult(code, optional body, optional remark) and completes the future; - on failure, it maps any JRaft error to
ResponseCode.CONTROLLER_JRAFT_INTERNAL_ERRORwith the status message; taskWithThisClosure()caches a JRaftTaskwhosedoneis the closure and whose data is the encoded request.
None of this has direct test coverage — a search of the module shows no test touches ControllerClosure. A regression in the response mapping (dropped body/remark, wrong error code, un-cached task re-encoding, wrong closure binding) would not be caught by the existing DLedgerControllerTest / manager tests, which don't exercise request completion.
Expected behavior
Direct contract tests: OK status completes the future with the configured code/body/remark (and leaves body/remark unset when absent); a failed status completes with CONTROLLER_JRAFT_INTERNAL_ERROR and the JRaft error message; taskWithThisClosure() returns the same Task instance on repeat calls, bound to this closure, carrying the encoded request.
- Ngôn ngữ chính
- Java
- Star
- 22.6k
- Fork
- 12k
- Merge trung bình
- 6 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay 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 apache/rocketmq
-
[Bug] mqadmin createUser/updateUser trim the ACL password, storing a secret the caller never typedCó thể đã có người làm @iloveeyjafjalla đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/rocketmq#11446 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] notifyMasterOnline aborts the long-polling wake-up with a NullPointerException when an arrival drains a bucket firstCó thể đã có người làm @iloveeyjafjalla đã 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
apache/rocketmq#11441 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] DefaultMQPushConsumer.shutdown() never stops the pop consume service, so its non-daemon threads keep the JVM aliveCó thể đã có người làm @iloveeyjafjalla đã 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 65/100
apache/rocketmq#11427 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Enhancement] FilterFactory duplicate-registration and unregister semantics lack testsCó thể đã có người làm @chennaji9 đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
apache/rocketmq#11340 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Enhancement] LogicExpression three-valued truth table and short-circuit behavior lack direct testsCó thể đã có người làm @chennaji9 đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/rocketmq#11339 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/rocketmq
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
scylladb/scylla-cdc-source-connector#350 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent:working documentation enhancement go:build lane:needs-decision
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Sanne/incus-spawn#1435 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:shuffle bug priority:high requires-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/datafusion-comet#7062 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
wait for review
Độ 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
-
enhancement good first issue up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
AnikethTS/ChangeRadar#22 ·
Maintainer thường phản hồi trong vòng 1 ngày