You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/09/01 23:18:00 UTC

[jira] [Updated] (SPARK-59160) The currentStageId initialized to 0, in the AdaptiveSparkPlanExec constructor, may clash with existing stageIDs in the AdaptiveExecutionContext

     [ https://issues.apache.org/jira/browse/SPARK-59160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated SPARK-59160:
-----------------------------------
    Labels: pull-request-available  (was: )

> The currentStageId   initialized to 0, in the AdaptiveSparkPlanExec constructor, may clash with existing stageIDs in the AdaptiveExecutionContext
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-59160
>                 URL: https://issues.apache.org/jira/browse/SPARK-59160
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.3.0, 4.1.3
>            Reporter: Asif
>            Priority: Major
>              Labels: pull-request-available
>
> The counter is initialized in the constructor of AdaptiveSparkPlanExec as
> private var currentStageId = 0
>  
> but the previous stages encountered in the subplans and cached in stageCache field of AdaptiveExecutionContext are bound to clash with IDs generated in the AdaptiveSparkPlanExec.
> As of now in the stock spark code, those Ids are not used for lookups ( instead its the canonicalized plans which are used), so there are no issues. ( atleast there are no failing tests and possibly no scope of bug).
>  
> But as seen in my private fork due to my changes, the clashing IDs result in bug.
>  
> May be to make the code safer for future , the currentStageId should be moved as a var field in AdaptiveExecutionContext , to guarantee uniqueness among all the stages seen within an AdaptiveExecutionContext.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org