Considering making the Completion interface extend AutoCloseable

オープン
#247 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
java

調査の方向性

この issue には、ファイル、テスト、エントリーポイントが何も記載されていません。まず Completion インターフェースを見つけ、同期および非同期のライフサイクルを追跡してください。完了とするには、AutoCloseable のサポートを追加するかどうか、また追加する場合にどのように追加するかについて、スコープを決定して文書化する必要があります。

索引モデルが issue の本文から書いたものです。

説明

Background and Intention

When using asynchronous processing completion, if a completion leak occurs, the system will be unable to consume furthur records which is quite dangerous. Therefore, avoiding completion leaks during development is a critical issue that requires attention.

However, in the context of collaboration and maintenance, as the complexity of the codebase increases and maintainers change over time, the likelihood of developers overlooking completion leaks also rises (e.g., complete being called across different locations in the call chain). I am considering whether there is a way to increase developers' awareness of completion leaks or to automatically check them.

Considerations

Perhaps one of the most effective approaches would be for developers to perform AST-based code analysis on their respective projects and integrate it into the CI pipeline. However, this is not something Decaton project can guarantee, and due to the cost, it is often not carried out.

Therefore, I am considering whether Completion could be annotated at the code level as something that must be completed, or whether it could be automatically completed at the appropriate time (though I haven't thought of a reasonable implementation for this).

Eventually, one idea I have is for Completion to extend the AutoCloseable interface. While this doesn't have any practical function, it would allow most developers' IDEs to detect the implementation of the AutoCloseable interface through their inspector tools, triggering warnings and serving as a pre-warning stuff.

I’d like to hear your thoughts on this. Thank you!

While this doesn't have any practical function ->

  • In sync complete scenarios, after the process method returns, the completion will be completed by decaton, so there is no need to control the completion process
  • In async complete scenarios, the completion is often completed during a callback, and completing it prematurely can cause issues.
主要言語
Java
スター
373
フォーク
61
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

line/decaton のほかの issue

line/decaton の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。