Skip to content

Commit

Permalink
Don't synchronize on stats update in ThriftHiveMetastore
Browse files Browse the repository at this point in the history
  • Loading branch information
wypb authored and yingsu00 committed Nov 16, 2024
1 parent ecfda83 commit f72d863
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ private Map<String, HiveColumnStatistics> groupStatisticsByColumn(List<ColumnSta
}

@Override
public synchronized void updateTableStatistics(MetastoreContext metastoreContext, String databaseName, String tableName, Function<PartitionStatistics, PartitionStatistics> update)
public void updateTableStatistics(MetastoreContext metastoreContext, String databaseName, String tableName, Function<PartitionStatistics, PartitionStatistics> update)
{
PartitionStatistics currentStatistics = getTableStatistics(metastoreContext, databaseName, tableName);
PartitionStatistics updatedStatistics = update.apply(currentStatistics);
Expand Down Expand Up @@ -652,7 +652,7 @@ private void deleteTableColumnStatistics(MetastoreContext metastoreContext, Stri
}

@Override
public synchronized void updatePartitionStatistics(MetastoreContext metastoreContext, String databaseName, String tableName, String partitionName, Function<PartitionStatistics, PartitionStatistics> update)
public void updatePartitionStatistics(MetastoreContext metastoreContext, String databaseName, String tableName, String partitionName, Function<PartitionStatistics, PartitionStatistics> update)
{
PartitionStatistics currentStatistics = requireNonNull(
getPartitionStatistics(metastoreContext, databaseName, tableName, ImmutableSet.of(partitionName)).get(partitionName), "getPartitionStatistics() returned null");
Expand Down

0 comments on commit f72d863

Please sign in to comment.