|
42 | 42 | import io.vertx.core.Future; |
43 | 43 | import io.vertx.core.Handler; |
44 | 44 | import io.vertx.core.Promise; |
45 | | -import io.vertx.core.WorkerExecutor; |
46 | 45 | import io.vertx.core.buffer.Buffer; |
47 | 46 | import io.vertx.core.http.HttpServerOptions; |
48 | 47 | import io.vertx.core.http.HttpServerResponse; |
@@ -133,7 +132,6 @@ public class UIDOperatorVerticle extends AbstractVerticle { |
133 | 132 | public static final long OPT_OUT_CHECK_CUTOFF_DATE = Instant.parse("2023-09-01T00:00:00.00Z").getEpochSecond(); |
134 | 133 | private final Handler<Boolean> saltRetrievalResponseHandler; |
135 | 134 | private final int allowClockSkewSeconds; |
136 | | - private final WorkerExecutor computeHeavyRequestWorkerPool; |
137 | 135 | protected Map<Integer, Set<String>> siteIdToInvalidOriginsAndAppNames = new HashMap<>(); |
138 | 136 | protected boolean keySharingEndpointProvideAppNames; |
139 | 137 | protected Instant lastInvalidOriginProcessTime = Instant.now(); |
@@ -167,8 +165,7 @@ public UIDOperatorVerticle(IConfigStore configStore, |
167 | 165 | IStatsCollectorQueue statsCollectorQueue, |
168 | 166 | SecureLinkValidatorService secureLinkValidatorService, |
169 | 167 | Handler<Boolean> saltRetrievalResponseHandler, |
170 | | - UidInstanceIdProvider uidInstanceIdProvider, |
171 | | - WorkerExecutor computeHeavyRequestWorkerPool) { |
| 168 | + UidInstanceIdProvider uidInstanceIdProvider) { |
172 | 169 | this.keyManager = keyManager; |
173 | 170 | this.secureLinkValidatorService = secureLinkValidatorService; |
174 | 171 | try { |
@@ -202,7 +199,6 @@ public UIDOperatorVerticle(IConfigStore configStore, |
202 | 199 | this.identityV3Enabled = config.getBoolean(IdentityV3Prop, false); |
203 | 200 | this.disableOptoutToken = config.getBoolean(DisableOptoutTokenProp, false); |
204 | 201 | this.uidInstanceIdProvider = uidInstanceIdProvider; |
205 | | - this.computeHeavyRequestWorkerPool = computeHeavyRequestWorkerPool; |
206 | 202 | this.isAsyncBatchRequestsEnabled = config.getBoolean(EnableAsyncBatchRequestProp, false); |
207 | 203 | } |
208 | 204 |
|
@@ -314,6 +310,7 @@ private void setUpEncryptedRoutes(Router mainRouter, BodyHandler bodyHandler) { |
314 | 310 | mainRouter.post(V3_IDENTITY_MAP.toString()).handler(bodyHandler).blockingHandler(auth.handleV1( |
315 | 311 | rc -> encryptedPayloadHandler.handle(rc, this::handleIdentityMapV3), Role.MAPPER), false); |
316 | 312 | } else { |
| 313 | + LOGGER.info("Async batch requests disabled"); |
317 | 314 | mainRouter.post(V2_KEY_SHARING.toString()).handler(bodyHandler).handler(auth.handleV1( |
318 | 315 | rc -> encryptedPayloadHandler.handle(rc, this::handleKeysSharing), Role.SHARER, Role.ID_READER)); |
319 | 316 | mainRouter.post(V2_KEY_BIDSTREAM.toString()).handler(bodyHandler).handler(auth.handleV1( |
@@ -697,20 +694,6 @@ public void handleKeysBidstream(RoutingContext rc) { |
697 | 694 | ResponseUtil.SuccessV2(rc, resp); |
698 | 695 | } |
699 | 696 |
|
700 | | - private Future<Void> handleKeysSharingAsync(RoutingContext rc) { |
701 | | - return computeHeavyRequestWorkerPool.executeBlocking(() -> { |
702 | | - handleKeysSharing(rc); |
703 | | - return null; |
704 | | - }); |
705 | | - } |
706 | | - |
707 | | - private Future<Void> handleKeysBidstreamAsync(RoutingContext rc) { |
708 | | - return computeHeavyRequestWorkerPool.executeBlocking(() -> { |
709 | | - handleKeysBidstream(rc); |
710 | | - return null; |
711 | | - }); |
712 | | - } |
713 | | - |
714 | 697 | private void addBidstreamHeaderFields(JsonObject resp, int maxBidstreamLifetimeSeconds) { |
715 | 698 | resp.put("max_bidstream_lifetime_seconds", maxBidstreamLifetimeSeconds + TOKEN_LIFETIME_TOLERANCE.toSeconds()); |
716 | 699 | addIdentityScopeField(resp); |
@@ -1071,13 +1054,6 @@ private Future handleLogoutAsyncV2(RoutingContext rc) { |
1071 | 1054 | } |
1072 | 1055 | } |
1073 | 1056 |
|
1074 | | - private Future<Void> handleBucketsV2Async(RoutingContext rc) { |
1075 | | - return computeHeavyRequestWorkerPool.executeBlocking(() -> { |
1076 | | - handleBucketsV2(rc); |
1077 | | - return null; |
1078 | | - }); |
1079 | | - } |
1080 | | - |
1081 | 1057 | private void handleBucketsV2(RoutingContext rc) { |
1082 | 1058 | final JsonObject req = (JsonObject) rc.data().get("request"); |
1083 | 1059 | final String qp = req.getString("since_timestamp"); |
@@ -1263,13 +1239,6 @@ private boolean validateServiceLink(RoutingContext rc) { |
1263 | 1239 | return false; |
1264 | 1240 | } |
1265 | 1241 |
|
1266 | | - private Future<Void> handleIdentityMapV2Async(RoutingContext rc) { |
1267 | | - return computeHeavyRequestWorkerPool.executeBlocking(() -> { |
1268 | | - handleIdentityMapV2(rc); |
1269 | | - return null; |
1270 | | - }); |
1271 | | - } |
1272 | | - |
1273 | 1242 | private void handleIdentityMapV2(RoutingContext rc) { |
1274 | 1243 | try { |
1275 | 1244 | final Integer siteId = RoutingContextUtil.getSiteId(rc); |
@@ -1333,13 +1302,6 @@ private InputUtil.InputVal[] getIdentityMapV2Input(RoutingContext rc) { |
1333 | 1302 | getInputList.get(); |
1334 | 1303 | } |
1335 | 1304 |
|
1336 | | - private Future<Void> handleIdentityMapV3Async(RoutingContext rc) { |
1337 | | - return computeHeavyRequestWorkerPool.executeBlocking(() -> { |
1338 | | - handleIdentityMapV3(rc); |
1339 | | - return null; |
1340 | | - }); |
1341 | | - } |
1342 | | - |
1343 | 1305 | private void handleIdentityMapV3(RoutingContext rc) { |
1344 | 1306 | try { |
1345 | 1307 | JsonObject jsonInput = (JsonObject) rc.data().get("request"); |
|
0 commit comments