Azure / Azure/durabletask

Composing an execution id for an activity

Aperta
#856 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
1.7k
Fork
335
Merge medio
2g 23h
PR unite (30g)
6

Descrizione

Hey, reaching out for help.

In order to implement idempotent activities I wish to have a unique string id that will represent a scheduled activity,
same id each time no matter if it is an activity retry.
For example, if I have the following code in the orchestration:
```
var tasks = Enumerable.Range(0, 20).Select(_ => OrchestrationContext.ScheduleWithRetry(
name: "some name",
version: "some version",
retryOptions: new RetryOptions(firstRetryInterval: TimeSpan.FromSeconds(1), maxNumberOfAttempts: 3),
GenerateInAnIdempotantWayAnActivityId()));
await Task.WhenAll(tasks).ConfigureAwait(true);
```
"GenerateInAnIdempotantWayAnActivityId" method should generate 20 different ids in a deterministic way even though I use "Task.WhenAll" and it should be resilient to the retries (each activity has maxNumberOfAttempts of 3 but the id should be the same on each try).
I went through the contexts and the middleware events and failed to find a way to concat different properties in a secure way.
Will appreciate your help here.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

L'issue non indica file, test o punti di ingresso; inizia tracciando i contesti di orchestrazione e gli eventi del middleware menzionati nel report. Chiarisci come vengono attualmente identificate le attività pianificate e i retry, quindi definisci quale comportamento supportato e quale verifica sarebbero considerati sufficienti affinché gli ID siano deterministici tra pianificazioni concorrenti e retry.

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

Valutazione

Stack tecnologico
csharp
Ambito
backend-api-design, distributed-systems
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.