diff --git a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/SendStatsPredicate.java b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/SendStatsPredicate.java index d5d0d861102a..437dd2b307eb 100644 --- a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/SendStatsPredicate.java +++ b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/SendStatsPredicate.java @@ -79,6 +79,8 @@ public static SendStatsPredicate create(PinotConfiguration serverConf, HelixMana public enum Mode { /// Sends stats only if all the cluster participants use the same known version. + // ALWAYS is strictly better than SAFE if all servers are already on versions >= 1.4 + @Deprecated SAFE { @Override public SendStatsPredicate create(HelixManager helixManager) { diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java index 916ca208a4aa..0852910c2907 100644 --- a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java +++ b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java @@ -2142,16 +2142,8 @@ public static class MultiStageQueryRunner { /// - "SAFE": MSE will only send stats if all instances in the cluster are running 1.4.0 or later. /// - "ALWAYS": MSE will always send stats, regardless of the version of the instances in the cluster. /// - "NEVER": MSE will never send stats. - /// - /// The reason for this flag that versions 1.3.0 and lower have two undesired behaviors: - /// 1. Some queries using intersection generate incorrect stats - /// 2. When stats from other nodes are sent but are different from expected, the query fails. - /// - /// In 1.4.0 the first issue is solved and instead of failing when unexpected stats are received, the query - /// continues without children stats. But if a query involves servers in versions 1.3.0 and 1.4.0, the one - /// running 1.3.0 may fail, which breaks backward compatibility. public static final String KEY_OF_SEND_STATS_MODE = "pinot.query.mse.stats.mode"; - public static final String DEFAULT_SEND_STATS_MODE = "SAFE"; + public static final String DEFAULT_SEND_STATS_MODE = "ALWAYS"; /// Used to indicate whether MSE pipeline breaker stats should be included in the queryStats field. /// This flag was introduced in 1.5.0. Before 1.5.0, MSE pipeline breaker stats were not kept. Starting from 1.5.0,