Commit 3b8b52c
committed
perf(sync): single-shot DCV retry — drop per-order challenge polling
PerformDcvIfNeededAsync now accepts an optional waitForChallengeSecondsOverride
parameter. Enroll continues to pass null, preserving the configured
DcvWaitForChallengeSeconds budget (default 60s) for one-shot end-to-end
issuance. TryRunDcvDuringSyncAsync passes 0, which forces a single
TrackOrder call per pending order — if CERTInext hasn't yet exposed the DCV
slot, sync moves on and the next sync cycle will pick the order up.
Motivation: with the previous code, every pending order in
Synchronize/GetSingleRecord could spend up to 60s polling for the DCV
challenge to materialize. On accounts with many pending orders this scaled
poorly — a live DCV-on sync against ~150 pending orders took 2:35.
After: the same sync completes in ~2s of plugin time per record (one
TrackOrder per pending order, no per-order delay loop). Already-issued
orders were and remain skipped (the gate at Synchronize line 719 only
runs the retry for EXTERNALVALIDATION).
Tests:
- New SyncDcvRetry_DoesSingleShotTrackOrder_WhenChallengeNotReady pins
the single-shot behaviour: even with DcvWaitForChallengeSeconds=60 in
config, the sync path makes exactly ONE TrackOrder call for an order
whose domainVerification is null and exits in <10s wall-clock.
- Existing happy-path tests still exercise the Enroll budget (which keeps
the full polling behaviour) via the null override.
146/146 unit tests pass.1 parent 797f666 commit 3b8b52c
2 files changed
Lines changed: 84 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
398 | 457 | | |
399 | 458 | | |
400 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | | - | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1063 | 1071 | | |
1064 | 1072 | | |
1065 | 1073 | | |
| |||
1081 | 1089 | | |
1082 | 1090 | | |
1083 | 1091 | | |
1084 | | - | |
| 1092 | + | |
| 1093 | + | |
1085 | 1094 | | |
1086 | 1095 | | |
1087 | | - | |
| 1096 | + | |
1088 | 1097 | | |
1089 | 1098 | | |
1090 | 1099 | | |
| |||
1110 | 1119 | | |
1111 | 1120 | | |
1112 | 1121 | | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
1113 | 1129 | | |
1114 | | - | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
1115 | 1134 | | |
1116 | 1135 | | |
1117 | 1136 | | |
1118 | 1137 | | |
1119 | 1138 | | |
1120 | 1139 | | |
1121 | | - | |
| 1140 | + | |
| 1141 | + | |
1122 | 1142 | | |
1123 | 1143 | | |
1124 | 1144 | | |
| |||
0 commit comments