Skip to content

Never reject free-context style transport requests #123039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ public static void registerRequestHandler(TransportService transportService, Sea
transportService.registerRequestHandler(
FREE_CONTEXT_SCROLL_ACTION_NAME,
freeContextExecutor,
true,
false,
ScrollFreeContextRequest::new,
freeContextHandler
);
Expand All @@ -400,7 +402,7 @@ public static void registerRequestHandler(TransportService transportService, Sea
);

// TODO: remove this handler once the lowest compatible version stops using it
transportService.registerRequestHandler(FREE_CONTEXT_ACTION_NAME, freeContextExecutor, in -> {
transportService.registerRequestHandler(FREE_CONTEXT_ACTION_NAME, freeContextExecutor, true, false, in -> {
var res = new ScrollFreeContextRequest(in);
// this handler exists for BwC purposes only, we don't need the original indices to free the context
OriginalIndices.readOriginalIndices(in);
Expand All @@ -411,6 +413,8 @@ public static void registerRequestHandler(TransportService transportService, Sea
transportService.registerRequestHandler(
CLEAR_SCROLL_CONTEXTS_ACTION_NAME,
freeContextExecutor,
true,
false,
ClearScrollContextsRequest::new,
(request, channel, task) -> {
searchService.freeAllScrollContexts();
Expand Down