LuciferYang commented on code in PR #14983:
URL: https://github.com/apache/gravitino/pull/14983#discussion_r4597464005
##########
core/src/main/java/org/apache/gravitino/catalog/FilesetOperationDispatcher.java:
##########
@@ -222,16 +222,17 @@ public Fileset createMultipleLocationFileset(
ident, comment, type, storageLocations,
updatedProperties)),
NoSuchSchemaException.class,
FilesetAlreadyExistsException.class));
- return EntityCombinedFileset.of(createdFileset)
- .withHiddenProperties(
- getMaskAndOmitKeys(
- catalogIdent,
- HasPropertyMetadata::filesetPropertiesMetadata,
- createdFileset.properties()));
} catch (RuntimeException e) {
- secretManager.rollbackSecrets(secretMaterials);
+ secretManager.rollbackSecrets(stagedSecrets);
Review Comment:
Thanks, fixed in 4d1d95f0a. Fileset create now uses the same guard as
schema: `createdInCatalog` is set right after `createMultipleLocationFileset`
returns, and the catch rolls back only while it is false. With the narrower
try, what could still fail after the create was detaching the connector result
and releasing the catalog lease inside `doWithCatalog`.
`testCreateKeepsSecretsOnceFilesetIsCreated` now also makes that
`doWithCatalog` call throw after the fileset is created, and checks the secret
is kept.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]