From: Vratko Polak Date: Fri, 10 Mar 2017 15:17:15 +0000 (+0100) Subject: Clarify javadocs related to ProgressTracker X-Git-Tag: release/carbon~122 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=b62d5a77da1c4e11d79d397ace8a8ffb96201556;hp=d2f03dcaedbf68a62d524fb066a1044007714c76;ds=sidebyside Clarify javadocs related to ProgressTracker Change-Id: Ie208037ec2759d15c4eff86315389968e76c07bc Signed-off-by: Vratko Polak --- diff --git a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AveragingProgressTracker.java b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AveragingProgressTracker.java index 1c6210a920..fe7b91f9dd 100644 --- a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AveragingProgressTracker.java +++ b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AveragingProgressTracker.java @@ -17,8 +17,9 @@ import javax.annotation.concurrent.NotThreadSafe; *

This class has {@code tasksOpenLimit} used as a (weak) limit, * as number of open tasks approaches that value, delays computed are increasing. * - *

In order to keep delays from raising to unreasonably high values, - * a maximal delay (per task) value is never exceeded. + *

In order to keep {@code estimateIsolatedDelay} values from raising unreasonably high, + * {@code defaultTicksPerTask} acts as a maximal value. {@code openTask} may return + * higher value if there are tasks above the limit. * *

On the other hand, there is no delay when number of open tasks is half the limit or less, * in order to prevent backend from running out of tasks while there may be waiting frontend threads. diff --git a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ProgressTracker.java b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ProgressTracker.java index 024141a040..25b7d7edc9 100644 --- a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ProgressTracker.java +++ b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ProgressTracker.java @@ -23,12 +23,12 @@ import org.slf4j.LoggerFactory; * In terms of taks processing, frontend is "opening" tasks and backend is "closing" them. * Latency of the backend may fluctuate wildly. To avoid backend running out of open tasks, * there should be a queue of requests frontend can add to. - * In order to avoid excessive memore consumption, there should be a back-pressure mechanism + * In order to avoid excessive memory consumption, there should be a back-pressure mechanism * which blocks the frontend threads for appropriate durations. * Frontend can tolerate moderately delayed responses, but it only tolerates small block times. * *

An ideal back-pressure algorithm would keep the queue reasonably full, - * while fairly delaying frontend threads. In other words, backend idle time should be low, + * while fairly delaying the frontend threads. In other words, backend idle time should be low, * as well as frontend block time dispersion * (as opposed to block time average, which is dictated by overall performance). * @@ -40,7 +40,9 @@ import org.slf4j.LoggerFactory; * *

This class is not thread safe, the callers are responsible for guarding against conflicting access. * Time is measured in ticks (nanos), methods never look at current time, relying on {@code now} argument instead. - * Input data used for tracking is tightly coupled with TransitQueue#recordCompletion arguments. + * This means the sequence of {$code now} argument values is expected to be non-decreasing. + * + *

Input data used for tracking is tightly coupled with TransitQueue#recordCompletion arguments. * * @author Vratko Polak */