xushiyan commented on code in PR #6886:
URL: https://github.com/apache/hudi/pull/6886#discussion_r990786831


##########
hudi-sync/hudi-datahub-sync/src/main/java/org/apache/hudi/sync/datahub/DataHubSyncClient.java:
##########
@@ -135,6 +133,37 @@ public void close() {
     // no op;
   }
 
+  // When updating an entity, it is ncessary to set its soft-delete status to 
false, or else the update won't get
+  // reflected in the UI.
+  private void undoSoftDelete(RestEmitter client, DatahubResponseLogger 
responseLogger) throws IOException, ExecutionException,
+          InterruptedException {
+    MetadataChangeProposalWrapper softDeleteUndoProposal = 
MetadataChangeProposalWrapper.builder()
+            .entityType("dataset")
+            .entityUrn(datasetUrn)
+            .upsert()
+            .aspect(SOFT_DELETE_FALSE)
+            .aspectName("status")
+            .build();
+
+    client.emit(softDeleteUndoProposal, responseLogger).get();

Review Comment:
   i see this is a different pattern here: it takes in an emitter and sends 
request from within `undoSoftDelete()`, while `createSchemaMetadataUpdate()` 
returns the change proposal. Can we align these 2? how about having emitter 
sending requests in the try block so it's clear to see what were sent in one 
place.



-- 
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]

Reply via email to