Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Proposal: Support Entity Locking

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

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

評価

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

調査の方向性

提案されているエントリーポイント context.lock と context.release から始め、それらの想定される動作を Durable Functions lock API と比較します。プロジェクトで、取得の一時停止、自動的な context-manager の破棄、手動解放について合意された設計が定まり、提案されている両方の使用パターンが実装とテストでカバーされれば完了です。

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

説明

Enhancement fixed-in-v2

We need to support the Durable Functions lock API that allows users to establish a critical section for serial Entity updates. I believe this would be the first OOProc PL to support this feature, so I want to make sure we're in the same page about how we plan to implement it.

I imagine the API would be yieldable, giving us an opportunity to pause the orchestrator execution if the lock cannot be readily acquired, and that it would take as argument a list of EntityIds.

In other words, I expect its interface to be as follows:

def lock(entityIds: List[string]):
Proposed syntax and usage patterns

The first, and recommended, usage pattern would be one where the lock disposal is automatically managed by some context manager, so as follows:

entityIds: List[string] = ["myEntity1", "myEntity2", ... ]
with (yield context.lock(entityIds)):
    # entity ops ... the lock is released at the end of this segment

The second usage pattern is one where entities are locked and released manually by separate APIs

entityIds: List[string] = ["myEntity1", "myEntity2", ... ]
yield context.lock(entityIds)
yield context.release(entityIds)

I expect we'll want to support this second option because not all OOProc PLs with necessarily have a convenient lock-disposal syntax such as Python's "with" statement.

Please let me know if y'all have any thoughts. Otherwise, I'll proceed to prioritize this for an upcoming release. Thanks!

主要言語
Python
スター
157
フォーク
71
PR マージ指標
30日以内にマージされた PR はありません

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

Azure/azure-functions-durable-python のほかの issue

Azure/azure-functions-durable-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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