Commit 7d4a409
committed
Fix StartActivityExecution request-ID dedup across server-side retries
Move RequestId generation before the proto clone so that the
RetryableInterceptor, which retries with the same request pointer,
carries the same server-generated RequestId on every attempt. Previously
the RequestId was generated on the clone, so each retry got a fresh UUID
that could not match the stored RequestId, breaking dedup and potentially
causing a double-create if the activity completed between attempts.
Fix Terminate/CancelActivity request-ID dedup across server-side retries
Same issue as StartActivityExecution: the RequestId was generated on a
clone, so RetryableInterceptor retries got a fresh UUID each time. For
Terminate, this caused a spurious FailedPrecondition error on retry
("already terminated with request ID ..."). For RequestCancel, same
pattern ("cancellation already requested with request ID ...").
Fix: set RequestId on the original request before any clone, matching
the OSS pattern used by workflow handlers.
These handlers had no other mutations requiring a clone, so the clone is
simply removed.1 parent 25b5771 commit 7d4a409
1 file changed
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
311 | | - | |
312 | 310 | | |
313 | 311 | | |
314 | 312 | | |
| |||
346 | 344 | | |
347 | 345 | | |
348 | 346 | | |
349 | | - | |
350 | | - | |
351 | 347 | | |
352 | 348 | | |
353 | 349 | | |
| |||
375 | 371 | | |
376 | 372 | | |
377 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
378 | 377 | | |
379 | 378 | | |
380 | 379 | | |
| |||
413 | 412 | | |
414 | 413 | | |
415 | 414 | | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | 415 | | |
421 | 416 | | |
422 | 417 | | |
| |||
0 commit comments