[ https://issues.apache.org/jira/browse/IMPALA-3127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17844100#comment-17844100 ]
ASF subversion and git services commented on IMPALA-3127: --------------------------------------------------------- Commit ee21427d26620b40d38c706b4944d2831f84f6f5 in impala's branch refs/heads/master from stiga-huang [ https://gitbox.apache.org/repos/asf?p=impala.git;h=ee21427d2 ] IMPALA-13009: Fix catalogd not sending deletion updates for some dropped partitions *Background* Since IMPALA-3127, catalogd sends incremental partition updates based on the last sent table snapshot ('maxSentPartitionId_' to be specific). Dropped partitions since the last catalog update are tracked in 'droppedPartitions_' of HdfsTable. When catalogd collects the next catalog update, they will be collected. HdfsTable then clears the set. See details in CatalogServiceCatalog#addHdfsPartitionsToCatalogDelta(). If an HdfsTable is invalidated, it's replaced with an IncompleteTable which doesn't track any partitions. The HdfsTable object is then added to the deleteLog so catalogd can send deletion updates for all its partitions. The same if the HdfsTable is dropped. However, the previously dropped partitions are not collected in this case, which results in a leak in the catalog topic if the partition name is not reused anymore. Note that in the catalog topic, the key of a partition update consists of the table name and the partition name. So if the partition is added back to the table, the topic key will be reused then resolves the leak. The leak will be observed when a coordinator restarts. In the initial catalog update sent from statestore, coordinator will find some partition updates that are not referenced by the HdfsTable (assuming the table is used again after the INVALIDATE). Then a Precondition check fails and the table is not added to the coordinator. *Overview of the patch* This patch fixes the leak by also collecting the dropped partitions when adding the HdfsTable to the deleteLog. A new field, dropped_partitions, is added in THdfsTable to collect them. It's only used when catalogd collects catalog updates. Removes the Precondition check in coordinator and just reports the stale partitions since IMPALA-12831 could also introduce them. Also adds a log line in CatalogOpExecutor.alterTableDropPartition() to show the dropped partition names for better diagnostics. Tests - Added e2e tests Change-Id: I12a68158dca18ee48c9564ea16b7484c9f5b5d21 Reviewed-on: http://gerrit.cloudera.org:8080/21326 Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> > Decouple partitions from tables > ------------------------------- > > Key: IMPALA-3127 > URL: https://issues.apache.org/jira/browse/IMPALA-3127 > Project: IMPALA > Issue Type: Improvement > Components: Catalog > Affects Versions: Impala 2.2.4 > Reporter: Dimitris Tsirogiannis > Assignee: Quanlong Huang > Priority: Major > Labels: catalog-server, performance > Fix For: Impala 4.0.0 > > > Currently, partitions are tightly integrated into the HdfsTable objects, > making incremental metadata updates difficult to perform. Furthermore, the > catalog transmits entire table metadata even when only few partitions change, > introducing significant latencies, wasting network bandwidth and CPU cycles > while updating table metadata at the receiving impalads. As a first step, we > should decouple partitions from tables and add them as a separate level in > the hierarchy of catalog entities (server-db-table-partition). Subsequently, > the catalog should transmit only entities that have changed after DDL/DML > statements. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org