You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zhihua Deng (Jira)" <ji...@apache.org> on 2025/11/14 06:30:00 UTC
[jira] [Resolved] (HIVE-28578) Concurrency issue in updateTableColumnStatistics
[ https://issues.apache.org/jira/browse/HIVE-28578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhihua Deng resolved HIVE-28578.
--------------------------------
Fix Version/s: 4.3.0
Resolution: Fixed
Thank you [~dkuzmenko] for the review!
> Concurrency issue in updateTableColumnStatistics
> ------------------------------------------------
>
> Key: HIVE-28578
> URL: https://issues.apache.org/jira/browse/HIVE-28578
> Project: Hive
> Issue Type: Bug
> Components: Standalone Metastore
> Reporter: Zsolt Miskolczi
> Assignee: Zhihua Deng
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.3.0
>
> Attachments: Repro.java
>
>
> Summary:
> updateTableColumnStatistics can throw SQLIntegrityConstraintViolationException during replication if HA is on and two different HMS instance gets the same call but with different engine.
>
> Workaround:
> Update table column statistics in single threaded.
>
> Details:
> updateTableColumnStatistics has a relative long running transaction. In that transaction, it validates the actual parameters, queries the metastore db against the TABLE_PARAMS that are already stored and makes a decision based on that. After this, it uses data nucleus to persist the new statistics.
> From the two HMS instances, one can save the column statistics. And the other cannot as the first instance already saved them.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)