Commit 38bd190
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 b6f9a9b commit 38bd190
1 file changed
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
299 | 297 | | |
300 | 298 | | |
301 | 299 | | |
| |||
333 | 331 | | |
334 | 332 | | |
335 | 333 | | |
336 | | - | |
337 | | - | |
338 | 334 | | |
339 | 335 | | |
340 | 336 | | |
| |||
362 | 358 | | |
363 | 359 | | |
364 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
365 | 364 | | |
366 | 365 | | |
367 | 366 | | |
| |||
400 | 399 | | |
401 | 400 | | |
402 | 401 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | 402 | | |
408 | 403 | | |
409 | 404 | | |
| |||
0 commit comments