You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "zratkai (via GitHub)" <gi...@apache.org> on 2024/12/02 08:48:40 UTC
Re: [PR] HIVE-28578: Fix concurrency issue in ObjectStore#updateTableColumnStatistics [hive]
zratkai commented on code in PR #5567:
URL: https://github.com/apache/hive/pull/5567#discussion_r1865451045
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
##########
@@ -10296,18 +10297,23 @@ public Map<String, String> updateTableColumnStatistics(ColumnStatistics colStats
}
// TODO: (HIVE-20109) ideally the col stats stats should be in colstats, not in the table!
- // Set the table properties
- // No need to check again if it exists.
- String dbname = table.getDbName();
- String name = table.getTableName();
- MTable oldt = mTable;
Map<String, String> newParams = new HashMap<>(table.getParameters());
- StatsSetupConst.setColumnStatsState(newParams, colNames);
- boolean isTxn = TxnUtils.isTransactionalTable(oldt.getParameters());
- if (isTxn) {
- if (!areTxnStatsSupported) {
- StatsSetupConst.setBasicStatsState(newParams, StatsSetupConst.FALSE);
- } else {
+
+ int retries = 3;
+ boolean success = false;
+ while (!success && retries > 0) {
+ // TODO## ideally the col stats stats should be in colstats, not in the table!
+ // Set the table properties
+ // No need to check again if it exists.
+ String dbname = table.getDbName();
+ String name = table.getTableName();
+ MTable oldt = mTable;
Review Comment:
Please use more meaningful name here like "oldaTable".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org