From 5b65e652e85a4a5b30329b80c310afcdc5acdb90 Mon Sep 17 00:00:00 2001 From: Amanda Bozigian Date: Mon, 25 Mar 2024 18:05:11 -0700 Subject: [PATCH] clean up comments --- .../metacat/metadata/mysql/MysqlUserMetadataService.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/metacat-metadata-mysql/src/main/java/com/netflix/metacat/metadata/mysql/MysqlUserMetadataService.java b/metacat-metadata-mysql/src/main/java/com/netflix/metacat/metadata/mysql/MysqlUserMetadataService.java index 1b9f5e6fa..e8b38a92e 100644 --- a/metacat-metadata-mysql/src/main/java/com/netflix/metacat/metadata/mysql/MysqlUserMetadataService.java +++ b/metacat-metadata-mysql/src/main/java/com/netflix/metacat/metadata/mysql/MysqlUserMetadataService.java @@ -223,7 +223,6 @@ public void deleteMetadata(final String userId, final List holders) .filter(m -> m instanceof HasDataMetadata && ((HasDataMetadata) m).isDataExternal()) .map(m -> ((HasDataMetadata) m).getDataUri()).collect(Collectors.toList()); if (!uris.isEmpty()) { - // TODO amboz determine if its OK to delete data metadata when DM fails onDelete _softDeleteDataMetadata(userId, uris); } } @@ -249,10 +248,8 @@ private void _deleteDefinitionMetadata( try { // apply interceptor to validate the object node this.metadataInterceptor.onDelete(this, name); - // add valid names to validNames validNames.add(name); } catch (Exception e) { - // if onDelete throws an exception, remove this name from aNames and log it final String message = String.format( "metadata onDelete for name %s encountered an exception", name ); @@ -270,7 +267,6 @@ private void _deleteDefinitionMetadata( .toArray(SqlParameterValue[]::new); if (aNames.length > 0) { final List paramVariables = Arrays.stream(aNames).map(s -> "?").collect(Collectors.toList()); - // At this point, only aNames that did not encounter an exception onDelete will be deleted jdbcTemplate.update( String.format(SQL.DELETE_DEFINITION_METADATA, Joiner.on(",").skipNulls().join(paramVariables)), (Object[]) aNames); @@ -278,7 +274,6 @@ private void _deleteDefinitionMetadata( if (aPartitionNames.length > 0) { final List paramVariables = Arrays.stream(aPartitionNames).map(s -> "?").collect(Collectors.toList()); - // At this point, only aPartitionNames that did not encounter an exception onDelete will be deleted jdbcTemplate.update( String.format(SQL.DELETE_PARTITION_DEFINITION_METADATA, Joiner.on(",").skipNulls().join(paramVariables)), (Object[]) aPartitionNames);