Class BlobTransferAdmissionController
java.lang.Object
com.linkedin.davinci.blobtransfer.server.BlobTransferAdmissionController
Host-level admission control for client-origin (Stateful CDC / external consumer) blob transfer requests.
This controller governs only the new client-request feature: it bounds concurrent client-origin transfers to
their own reserved cap, which is a percentage of the host blob-transfer budget. Server-to-server (and DVC-to-DVC)
transfers are not tracked here -- they keep using the pre-existing global concurrency counter in
P2PFileTransferServerHandler. The two budgets are intentionally independent so client traffic can never
perturb the tuned server-to-server path.
The client cap is decided atomically under a single lock. Admission frequency is low (a handful of concurrent
cold-start transfers, each lasting minutes), so synchronized carries no meaningful cost.
-
Constructor Summary
ConstructorsConstructorDescriptionBlobTransferAdmissionController(int maxConcurrentTransfers, int clientCapacityPercent) -
Method Summary
Modifier and TypeMethodDescriptionintintvoidRelease a previously admitted client-origin slot.booleanAttempt to admit a client-origin transfer, incrementing the in-flight count on success.
-
Constructor Details
-
BlobTransferAdmissionController
public BlobTransferAdmissionController(int maxConcurrentTransfers, int clientCapacityPercent) - Parameters:
maxConcurrentTransfers- the host-wide concurrency budgetN(must be > 0) that the client cap is expressed as a percentage of.clientCapacityPercent- the percentage [0, 50] ofNreserved as the client-origin cap.0disables client-origin transfers entirely; any positive percentage yields a cap of at least 1 so a small budget does not silently round the client reservation down to zero. Capped at 50% so client transfers cannot dominate shared host I/O.
-
-
Method Details
-
tryAdmitClient
public boolean tryAdmitClient()Attempt to admit a client-origin transfer, incrementing the in-flight count on success. The caller must invokereleaseClient()exactly once for everytrueresult, when the transfer finishes.- Returns:
trueif admitted,falseif the client-origin reservation is full.
-
releaseClient
public void releaseClient()Release a previously admitted client-origin slot. Clamped at 0 to defend against a double release. -
getClientInFlight
public int getClientInFlight() -
getMaxClientTransfers
public int getMaxClientTransfers()
-