celestiaorg / celestiaorg/celestia-node
architecture (share/Getter): Getter should be atomic
- 主要言語
- Go
- スター
- 998
- フォーク
- 1.1k
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 34
説明
### Implementation ideas
Current high order getter [CascadeGetter](https://github.com/celestiaorg/celestia-node/pull/1628) implementation assumes that if underlying getter request has been canceled by context, the overall getter operation should be noop, allowing next getter to start from unaffected state. Thus every getter implementation is required to satisfy atomic property of transaction. Also getter should treat external context cancelation as expected at any time and update internal state(if any) accordingly (e.g .shrex.Getter peer manager)
For example, shrex.Getter(not finished yet) should make more complex decision on peer in case of context.Deadline, taking into account possibility of external ctx cancelation.
TeeGetter should either finish write operation, or rollback internal storage state.
Future contributions to existing or introduced Getters should always take transactional property into account. This could affect introduction of caching, for example
Need to check all getters that are already merged and in development to identify if there is need to be any enhancements:
- [x] #1488
- [x] #1489
- [x] #1490
- [x] #1491
- [ ] #1535
コントリビューションガイド
調査の方向性
まず、PR #1628 の CascadeGetter の実装と、#1488、#1489、#1490、#1491、#1535 で追跡されている getter の作業を確認してください。shrex.Getter と TeeGetter について、キャンセル処理と状態変更を調べてください。影響を受ける getter がコンテキストのキャンセル時にもアトミックな動作を維持し、残っている checklist の項目に対応できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- go
- 領域
- backend, distributed-systems
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100