Skip to content

Commit

Permalink
#10781 try to stabilize secondary_super_cache
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Orban <[email protected]>
  • Loading branch information
lorban committed Oct 27, 2023
1 parent 7be6c4b commit c22166f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.util.concurrent.atomic.AtomicReference;

import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.thread.Invocable;
import org.eclipse.jetty.util.thread.Invocable.InvocationType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -116,7 +115,8 @@ public boolean isInterested()
public InvocationType getCallbackInvocationType()
{
Callback callback = _interested.get();
return Invocable.getInvocationType(callback);
// Identical to Invocable.getInvocationType(callback) except that the cast is costly here.
return callback == null ? InvocationType.BLOCKING : callback.getInvocationType();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,9 +716,12 @@ default InvocationType getInvocationType()
*/
class Wrapper extends Attributes.Wrapper implements Request
{
private final Request request;

public Wrapper(Request wrapped)
{
super(wrapped);
this.request = wrapped;
}

@Override
Expand Down Expand Up @@ -856,7 +859,8 @@ public Session getSession(boolean create)
@Override
public Request getWrapped()
{
return (Request)super.getWrapped();
// Identical to (Request)super.getWrapped() except that the cast is costly here.
return request;
}
}

Expand Down

0 comments on commit c22166f

Please sign in to comment.