-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Enable preferred write partitioning for FTE by default #14735
Changes from all commits
67e49f1
0826299
4b98aac
781bca8
bd2e235
1f3d8ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,7 +168,6 @@ public final class SystemSessionProperties | |
public static final String FAULT_TOLERANT_EXECUTION_TASK_MEMORY_GROWTH_FACTOR = "fault_tolerant_execution_task_memory_growth_factor"; | ||
public static final String FAULT_TOLERANT_EXECUTION_TASK_MEMORY_ESTIMATION_QUANTILE = "fault_tolerant_execution_task_memory_estimation_quantile"; | ||
public static final String FAULT_TOLERANT_EXECUTION_PARTITION_COUNT = "fault_tolerant_execution_partition_count"; | ||
public static final String FAULT_TOLERANT_EXECUTION_PRESERVE_INPUT_PARTITIONS_IN_WRITE_STAGE = "fault_tolerant_execution_preserve_input_partitions_in_write_stage"; | ||
public static final String ADAPTIVE_PARTIAL_AGGREGATION_ENABLED = "adaptive_partial_aggregation_enabled"; | ||
public static final String ADAPTIVE_PARTIAL_AGGREGATION_MIN_ROWS = "adaptive_partial_aggregation_min_rows"; | ||
public static final String ADAPTIVE_PARTIAL_AGGREGATION_UNIQUE_ROWS_RATIO_THRESHOLD = "adaptive_partial_aggregation_unique_rows_ratio_threshold"; | ||
|
@@ -177,6 +176,7 @@ public final class SystemSessionProperties | |
public static final String FORCE_SPILLING_JOIN = "force_spilling_join"; | ||
public static final String FAULT_TOLERANT_EXECUTION_EVENT_DRIVEN_SCHEDULER_ENABLED = "fault_tolerant_execution_event_driven_scheduler_enabled"; | ||
public static final String FORCE_FIXED_DISTRIBUTION_FOR_PARTITIONED_OUTPUT_OPERATOR_ENABLED = "force_fixed_distribution_for_partitioned_output_operator_enabled"; | ||
public static final String FAULT_TOLERANT_EXECUTION_FORCE_PREFERRED_WRITE_PARTITIONING_ENABLED = "fault_tolerant_execution_force_preferred_write_partitioning_enabled"; | ||
|
||
private final List<PropertyMetadata<?>> sessionProperties; | ||
|
||
|
@@ -832,11 +832,6 @@ public SystemSessionProperties( | |
"Number of partitions for distributed joins and aggregations executed with fault tolerant execution enabled", | ||
queryManagerConfig.getFaultTolerantExecutionPartitionCount(), | ||
false), | ||
booleanProperty( | ||
FAULT_TOLERANT_EXECUTION_PRESERVE_INPUT_PARTITIONS_IN_WRITE_STAGE, | ||
"Ensure single task reads single hash partitioned input partition for stages which write table data", | ||
queryManagerConfig.getFaultTolerantPreserveInputPartitionsInWriteStage(), | ||
false), | ||
booleanProperty( | ||
ADAPTIVE_PARTIAL_AGGREGATION_ENABLED, | ||
"When enabled, partial aggregation might be adaptively turned off when it does not provide any performance gain", | ||
|
@@ -877,6 +872,11 @@ public SystemSessionProperties( | |
FORCE_FIXED_DISTRIBUTION_FOR_PARTITIONED_OUTPUT_OPERATOR_ENABLED, | ||
"Force partitioned output operator to be run with fixed distribution", | ||
optimizerConfig.isForceFixedDistributionForPartitionedOutputOperatorEnabled(), | ||
true), | ||
booleanProperty( | ||
FAULT_TOLERANT_EXECUTION_FORCE_PREFERRED_WRITE_PARTITIONING_ENABLED, | ||
"Force preferred write partitioning for fault tolerant execution", | ||
queryManagerConfig.isFaultTolerantExecutionForcePreferredWritePartitioningEnabled(), | ||
true)); | ||
} | ||
|
||
|
@@ -1521,11 +1521,6 @@ public static double getFaultTolerantExecutionTaskMemoryEstimationQuantile(Sessi | |
return session.getSystemProperty(FAULT_TOLERANT_EXECUTION_TASK_MEMORY_ESTIMATION_QUANTILE, Double.class); | ||
} | ||
|
||
public static boolean getFaultTolerantPreserveInputPartitionsInWriteStage(Session session) | ||
{ | ||
return session.getSystemProperty(FAULT_TOLERANT_EXECUTION_PRESERVE_INPUT_PARTITIONS_IN_WRITE_STAGE, Boolean.class); | ||
} | ||
|
||
public static int getFaultTolerantExecutionPartitionCount(Session session) | ||
{ | ||
return session.getSystemProperty(FAULT_TOLERANT_EXECUTION_PARTITION_COUNT, Integer.class); | ||
|
@@ -1570,4 +1565,13 @@ public static boolean isForceFixedDistributionForPartitionedOutputOperatorEnable | |
{ | ||
return session.getSystemProperty(FORCE_FIXED_DISTRIBUTION_FOR_PARTITIONED_OUTPUT_OPERATOR_ENABLED, Boolean.class); | ||
} | ||
|
||
public static boolean isFaultTolerantExecutionForcePreferredWritePartitioningEnabled(Session session) | ||
{ | ||
if (!isFaultTolerantExecutionEventDriverSchedulerEnabled(session)) { | ||
// supported only in event driven scheduler | ||
return false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we throw instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hopefully we will remove the legacy scheduler soon. I added this more as of a precaucion in case somebody needs to revert to the old scheduler what could result into skew issues. |
||
} | ||
return session.getSystemProperty(FAULT_TOLERANT_EXECUTION_FORCE_PREFERRED_WRITE_PARTITIONING_ENABLED, Boolean.class); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer not to document it and drop it after some period. There's no real reason why would somebody want to disable it unless there's a correctness or performance bug.