Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Refactoring to onStreamOpen, onStreamClose, and onStreamCloseWithError to include Node

Đang mở
#40 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

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
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
grpc, java
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Bắt đầu với vòng đời của stream observer và đọc phần thảo luận của pull request được liên kết, đặc biệt là các đánh đổi về thời điểm onStreamOpen được kích hoạt. Theo dõi cách DiscoveryRequest cuối cùng cung cấp Node cho onStreamClose và onStreamCloseWithError. Được xem là hoàn tất khi các callback cung cấp Node ở nơi có sẵn, các callback đóng tài liệu hóa Node nullable, và thời điểm được chọn cho sự kiện mở nhất quán với giao thức ADS/xDS.

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

Mô tả

Relevant discussion: https://github.com/envoyproxy/java-control-plane/pull/35#discussion_r177099465

Ideally we would have access to the Node during the stream open and close callbacks. Due to the stream observer design, there are some tradeoffs in order to support that.

For onStreamOpen, currently we're triggering that callback outside of the request StreamObserver. At that point, we haven't actually received a DiscoveryRequest yet, so we haven't been given the Node yet. A potential workaround would be to delay the onStreamOpen event until we receive the first request message. In theory there could be an arbitrarily large gap between when the stream is actually opened and when the first request is sent and with this approach we lose the ability to measure that. In practice, is that something that we really care about for this use case? With the ADS/xDS protocol design, the first message is always sent from the client and it occurs immediately after the stream is opened.

For onStreamClose and onStreamCloseWithError, we can just cache the Node from the last request message. Consumers will just need to be aware that the node parameter in this scenario is @Nullable because the stream could close without ever receiving a request.

Ngôn ngữ chính
Java
Star
312
Fork
150
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 envoyproxy/java-control-plane

Tất cả issue của envoyproxy/java-control-plane

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.