Events added to in-memory queue are not being raised after ContinueAsNew called. #676
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia con gli esempi di orchestrator_function e HttpStarter nell’issue, quindi riproduci il comportamento inviando due richieste in rapida successione. Traccia come wait_for_external_event, raise_event e continue_as_new gestiscono la coda di eventi in memoria. Il lavoro è completato quando l’evento generato dopo l’elaborazione della prima richiesta viene ricevuto ed elaborato dall’orchestratore riavviato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🐛 Describe the bug
I had the exact same problem as described in the c# library (https://github.com/Azure/azure-functions-durable-extension/issues/676): only the first event is processed when raising event in a quick succession.
🤔 Expected behavior
I was expecting continue_as_new to resume the orchestrator_function and to pick the next event in the queue.
☕ Steps to reproduce
What Durable Functions patterns are you using, if any?
I was testing the singleton orchestrator patterns. Instead of directly invoking the orchestrator, I use raise_event to communicate with the orchestrator. The orchestrator listens to the incoming event with wait_for_external_event and triggers the processing.
Any minimal reproducer we can use?
The orchestrator function
def orchestrator_function(context: df.DurableOrchestrationContext):
logging.warning("orchestrator starts")
result = yield context.wait_for_external_event('wait_for_request')
req = json.loads(result)
yield context.call_activity('Hello1', json.dumps(req))
yield context.call_activity('Hello1', json.dumps(req))
yield context.call_activity('Hello1', json.dumps(req))
logging.warning("orchestrator ends", req)
context.continue_as_new(None)
The Hello1 activity function uses time.sleep(5) to simulate extended processing.
The HttpStarter
async def main(req: func.HttpRequest, starter: str) -> func.HttpResponse:
client = df.DurableOrchestrationClient(starter)
req_body = req.get_json()
function_name = "orchestrator_function"
h = hashlib.sha256()
h.update(str.encode(req_body['endpoint']))
instance_id = h.hexdigest()
existing_instance = await client.get_status(instance_id)
logging.warning(req_body)
logging.warning(f"Start orchestration with ID = '{instance_id}'.")
if existing_instance.runtime_status in [
df.OrchestrationRuntimeStatus.Completed,
df.OrchestrationRuntimeStatus.Failed,
df.OrchestrationRuntimeStatus.Terminated,
None]:
instance_id = await client.start_new(function_name, instance_id, None)
logging.warning(f"Started orchestration with ID = '{instance_id}'.")
await client.raise_event(instance_id, 'wait_for_request', req_body)
return client.create_check_status_response(req, instance_id)
When sending two HTTP requests to the HttpStarter consecutively (not simultaneously but with a bit gap), the orchestrator gets the first message and finishes the processing, but never picks up the second message.
Are you running this locally or on Azure?
I have tested both locally and on Azure. I currently work on a prototype that uses the singleton durable function to control the traffic to endpoints. Some endpoints may allow concurrent traffic and some may not.
⚡If deployed to Azure
We have access to a lot of telemetry that can help with investigations. Please provide as much of the following information as you can to help us investigate!
- Timeframe issue observed: 2021-11-02
- Function App name: tao-func-test1
- Function name(s): adapter_controller (orchestrator), http_trigger (HttpStarter)
- Azure region: US east
- Orchestration instance ID(s): 5e0c90d2d434f24b1ec3df57316653d00de3cc27b2001902cd0983c18e381b78
- Azure storage account name: taofunctest1
If you don't want to share your Function App or storage account name GitHub, please at least share the orchestration instance ID. Otherwise it's extremely difficult to look up information.
- Lingua principale
- Python
- Stelle
- 157
- Fork
- 70
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/azure-functions-durable-python
-
Enhancement fixed-in-v2 P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Azure/azure-functions-durable-python#617 · 1 commento ·
-
bug Debuggability fixed-in-v2 P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Azure/azure-functions-durable-python#587 · 2 commenti · 1 reazione ·
-
Custom object serialization broken for orchestrator return valuesForse già presa @andystaples l’ha presa 68 giorni fa. Apertabug fixed-in-v2 P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Azure/azure-functions-durable-python#568 · 1 commento ·
-
bug fixed-in-v2 P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Azure/azure-functions-durable-python#475 · 1 commento ·
-
Enhancement fixed-in-v2 P3
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
Azure/azure-functions-durable-python#618 · 1 commento ·
Tutte le issue di Azure/azure-functions-durable-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
SR_SECURITY_DESCRIPTOR.fromString drops the SACL when no DACL is presentForse già presa @paul7436 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
equinor/fmu-sumo-uploader#302 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
modelscope/evalscope#1821 ·
I maintainer di solito rispondono entro 1 giorno
-
Sanity on ansible-core devel fails: ignore-2.23.txt references the removed import-3.9 testForse già presa @yurnov l’ha presa oggi. Apertaneeds_triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
ansible-collections/kubernetes.core#1275 ·
I maintainer di solito rispondono entro 1 giorno