Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Proposal: Support Entity Locking

Aperta
#277 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Inizia dai punti di ingresso proposti context.lock e context.release e confronta il loro comportamento previsto con la Durable Functions lock API. Il lavoro è completato quando il progetto dispone di un design concordato per mettere in pausa l’acquisizione, effettuare lo smaltimento automatico del context-manager e procedere al rilascio manuale, con entrambi i pattern di utilizzo proposti coperti dall’implementazione e dai test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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!

Lingua principale
Python
Stelle
157
Fork
70
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/azure-functions-durable-python

Tutte le issue di Azure/azure-functions-durable-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.