Arafat Khan created HDDS-12968:
----------------------------------

             Summary: [Recon] Fix column visibility issue in Derby during 
schema upgrade finalization
                 Key: HDDS-12968
                 URL: https://issues.apache.org/jira/browse/HDDS-12968
             Project: Apache Ozone
          Issue Type: Bug
          Components: Ozone Recon, upgrade
            Reporter: Arafat Khan
             Fix For: 2.1.0


Recon fails during startup while finalizing layout upgrades due to Derby not 
recognizing recently added columns in the {{RECON_TASK_STATUS}} table. The 
failure occurs specifically during the update of default values for newly added 
columns {{last_task_run_status}} and {{{}is_current_task_running{}}}.

*Observed Error Log:*
{code:java}
SQL [update RECON_TASK_STATUS set last_task_run_status = cast(? as int), 
is_current_task_running = cast(? as int)];
'LAST_TASK_RUN_STATUS' is not a column in table or VTI 
'RECON.RECON_TASK_STATUS' {code}
Even though the columns were successfully added in the previous transaction, 
Derby fails to recognize them in a subsequent query within the same connection 
or when the field name is not quoted (case-sensitive mismatch).
----
*Root Cause:*
 # Derby treats unquoted column names as {*}uppercase{*}. Hence, referencing 
{{last_task_run_status}} (in lowercase) without quoting causes column-not-found 
errors if the column was created using a quoted lowercase name.

 # The JOOQ-generated SQL internally converts unquoted fields like 
{{DSL.field("col")}} into {{"COL"}} in Derby unless explicitly wrapped with 
{{{}DSL.name(){}}}, which preserves the case sensitivity correctly.
 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to