apache / druid

Apache Druid: a high performance real-time analytics database.
https://druid.apache.org/
Apache License 2.0
13.52k stars 3.71k forks source link

MSQ WF: Pass a flag from broker to determine operator chain transformation #17443

Closed Akshat-Jain closed 1 week ago

Akshat-Jain commented 2 weeks ago

Description

In https://github.com/apache/druid/pull/17433, we had to move the operator-chain-transformation logic to the MSQ worker layer to ensure backward compatibility. But it wasn't ideal since such logic shouldn't be a responsibility of the worker.

On further offline discussion, an alternative was suggested that we can pass a flag from the broker during query execution.

If MSQ controller sees the flag, then it does the operator transformation. Otherwise it doesn't do the operator transformation.

This relies on the upgrade order of the different services. This allows us to achieve backward compatibility since brokers are upgraded after indexers/middlemanagers, so passing a flag is essentially passing info whether all indexers/middlemanagers have been upgraded or not - hence helps us achieve backward compatibility.


This PR has: