@@ -154,7 +154,10 @@ private SearchFSCommand getCommand(Featuregroup featureGroup, SearchFSCommandOp
154
154
command .setInodeId (inode .getId ());
155
155
command .setProject (featureGroup .getFeaturestore ().getProject ());
156
156
command .setStatus (CommandStatus .NEW );
157
- command .setFeatureGroup (featureGroup );
157
+ if (!SearchFSCommandOp .DELETE_ARTIFACT .equals (op )) {
158
+ // Don't set it since a separate transaction deletes FG, this could cause it to be potentially recreated
159
+ command .setFeatureGroup (featureGroup );
160
+ }
158
161
command .setOp (op );
159
162
return command ;
160
163
}
@@ -171,7 +174,10 @@ private SearchFSCommand getCommand(FeatureView featureView, SearchFSCommandOp op
171
174
command .setInodeId (inode .getId ());
172
175
command .setProject (featureView .getFeaturestore ().getProject ());
173
176
command .setStatus (CommandStatus .NEW );
174
- command .setFeatureView (featureView );
177
+ if (!SearchFSCommandOp .DELETE_ARTIFACT .equals (op )) {
178
+ // Don't set it since a separate transaction deletes FV, this could cause it to be potentially recreated
179
+ command .setFeatureView (featureView );
180
+ }
175
181
command .setOp (op );
176
182
return command ;
177
183
}
@@ -194,7 +200,10 @@ private SearchFSCommand getCommand(TrainingDataset trainingDataset, SearchFSComm
194
200
command .setInodeId (inode .getId ());
195
201
command .setProject (trainingDataset .getFeaturestore ().getProject ());
196
202
command .setStatus (CommandStatus .NEW );
197
- command .setTrainingDataset (trainingDataset );
203
+ if (!SearchFSCommandOp .DELETE_ARTIFACT .equals (op )) {
204
+ // Don't set it since a separate transaction deletes TD, this could cause it to be potentially recreated
205
+ command .setTrainingDataset (trainingDataset );
206
+ }
198
207
command .setOp (op );
199
208
return command ;
200
209
}
0 commit comments