Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Proposal: Support Entity Locking

未关闭
#277 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
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 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Azure/azure-functions-durable-python 的其他 Issue

查看 Azure/azure-functions-durable-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。