Skip to content

Brokers to catch repetitive queries #7231

@leventov

Description

@leventov

Description

Broker registers queries being executed and associates them with Future objects. When it notices that a query has arrived that is already being executed, it just puts the HTTP thread to await to the same (already existing) Future, instead of sparking a duplicate execution.

This can be seen as a form of results "pre-cache".

Motivation

When a query executes for a long time, users get impatient and reload a web interface, initiating the same queries to Druid. Currently, by doing so they only make things worse, because brokers (and historicals), still crunching results for the previous query (if no form of cancellation protocol is used), start another instance of the query.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions