Skip to content

Commit

Permalink
[FSTORE-1475] fix partial FG deletion (#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
bubriks authored Jul 31, 2024
1 parent 88cfb9c commit 8f4d4aa
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 8f4d4aa

Please sign in to comment.