Skip to content

Commit ef14c09

Browse files
committed
reorder resolvePartition call since we do not need it for bypass
1 parent 7dd2ae8 commit ef14c09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

concurrency-limits-core/src/main/java/com/netflix/concurrency/limits/limiter/AbstractPartitionedLimiter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,12 @@ private Partition resolvePartition(ContextT context) {
225225

226226
@Override
227227
public Optional<Listener> acquire(ContextT context) {
228-
final Partition partition = resolvePartition(context);
229-
230228
if (shouldBypass(context)){
231229
return createBypassListener();
232230
}
233231

232+
final Partition partition = resolvePartition(context);
233+
234234
// This is a little unusual in that the partition is not a hard limit. It is
235235
// only a limit that it is applied if the global limit is exceeded. This allows
236236
// for excess capacity in each partition to allow for bursting over the limit,

0 commit comments

Comments
 (0)