diff --git a/hopsworks-common/src/main/java/io/hops/hopsworks/common/commands/featurestore/search/SearchFSCommandLogger.java b/hopsworks-common/src/main/java/io/hops/hopsworks/common/commands/featurestore/search/SearchFSCommandLogger.java index e9218afab6..bd7a28876c 100644 --- a/hopsworks-common/src/main/java/io/hops/hopsworks/common/commands/featurestore/search/SearchFSCommandLogger.java +++ b/hopsworks-common/src/main/java/io/hops/hopsworks/common/commands/featurestore/search/SearchFSCommandLogger.java @@ -154,7 +154,10 @@ private SearchFSCommand getCommand(Featuregroup featureGroup, SearchFSCommandOp command.setInodeId(inode.getId()); command.setProject(featureGroup.getFeaturestore().getProject()); command.setStatus(CommandStatus.NEW); - command.setFeatureGroup(featureGroup); + if (!SearchFSCommandOp.DELETE_ARTIFACT.equals(op)) { + // Don't set it since a separate transaction deletes FG, this could cause it to be potentially recreated + command.setFeatureGroup(featureGroup); + } command.setOp(op); return command; } @@ -171,7 +174,10 @@ private SearchFSCommand getCommand(FeatureView featureView, SearchFSCommandOp op command.setInodeId(inode.getId()); command.setProject(featureView.getFeaturestore().getProject()); command.setStatus(CommandStatus.NEW); - command.setFeatureView(featureView); + if (!SearchFSCommandOp.DELETE_ARTIFACT.equals(op)) { + // Don't set it since a separate transaction deletes FV, this could cause it to be potentially recreated + command.setFeatureView(featureView); + } command.setOp(op); return command; } @@ -194,7 +200,10 @@ private SearchFSCommand getCommand(TrainingDataset trainingDataset, SearchFSComm command.setInodeId(inode.getId()); command.setProject(trainingDataset.getFeaturestore().getProject()); command.setStatus(CommandStatus.NEW); - command.setTrainingDataset(trainingDataset); + if (!SearchFSCommandOp.DELETE_ARTIFACT.equals(op)) { + // Don't set it since a separate transaction deletes TD, this could cause it to be potentially recreated + command.setTrainingDataset(trainingDataset); + } command.setOp(op); return command; }