Commit 4fab2b0
committed
Use a single worker thread for LWCA key retrieval
Lightweight CA key retrieval is failing in an IPA test scenario
where many sub-CAs are created in rapid succession. The test output
suggests resource exhaustion (e.g. LDAP server connections). The
current implementation spawns a separate, concurrent key retriever
thread for each new LWCA. This behaviour is suspected to be the
cause of the failure.
Modify LWCA key retrieval to use a single retriever thread per
replica. Retrievals are processed sequentially. The exponential
backoff on failure is retained.
The queue behaviour lives in the new `KeyRetrieverWorker` class,
which uses `java.util.Timer` under the hood. `CAEngine`
instantiates a single instance of `KeyRetrieverWorker`, which in
turn starts the single timer thread and manages the queue.
Fixes: https://issues.redhat.com/browse/RHEL-27181
Fixes: dogtagpki#46771 parent a74c8ad commit 4fab2b0
File tree
4 files changed
+106
-35
lines changed- base/ca/src/main/java
- com/netscape/ca
- org/dogtagpki/server/ca
4 files changed
+106
-35
lines changedLines changed: 2 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
224 | 222 | | |
225 | 223 | | |
226 | 224 | | |
| |||
649 | 647 | | |
650 | 648 | | |
651 | 649 | | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
| 650 | + | |
658 | 651 | | |
659 | 652 | | |
660 | 653 | | |
| |||
688 | 681 | | |
689 | 682 | | |
690 | 683 | | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
| 684 | + | |
698 | 685 | | |
699 | 686 | | |
700 | 687 | | |
| |||
Lines changed: 10 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
82 | 68 | | |
83 | 69 | | |
84 | 70 | | |
| |||
89 | 75 | | |
90 | 76 | | |
91 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
92 | 82 | | |
93 | | - | |
| 83 | + | |
94 | 84 | | |
95 | 85 | | |
96 | 86 | | |
| |||
Lines changed: 83 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| 212 | + | |
| 213 | + | |
211 | 214 | | |
212 | 215 | | |
213 | 216 | | |
| |||
328 | 331 | | |
329 | 332 | | |
330 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
331 | 338 | | |
332 | 339 | | |
333 | 340 | | |
| |||
1087 | 1094 | | |
1088 | 1095 | | |
1089 | 1096 | | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
1090 | 1101 | | |
1091 | 1102 | | |
1092 | 1103 | | |
| |||
0 commit comments