@@ -190,12 +190,6 @@ func (d *Datastore) lowlevelTransactionSet(ctx context.Context, transaction *typ
190190 return nil , err
191191 }
192192
193- // we need to curate a list of all the paths involved, of the old and new intent contents.
194- // this is then used to load the IntendedStore highes prio into the tree, to decide if an update
195- // is to be applied or if a higher precedence update exists and is therefore not applicable. Also if the value got
196- // deleted and a previousely shadowed entry becomes active.
197- involvedPaths := treetypes .NewPathSet ()
198-
199193 // create a flags attribute
200194 flagNew := treetypes .NewUpdateInsertFlags ()
201195 // where the New flag is set
@@ -223,19 +217,16 @@ func (d *Datastore) lowlevelTransactionSet(ctx context.Context, transaction *typ
223217 return nil , err
224218 }
225219
226- // add the content to the Tree
227- err = root .AddUpdatesRecursive (ctx , intent .GetUpdates (), flagNew )
228- if err != nil {
229- return nil , err
230- }
231-
232- // add the explicit delete entries
233- root .AddExplicitDeletes (intent .GetName (), intent .GetPriority (), intent .GetDeletes ())
220+ if ! intent .GetDeleteFlag () {
221+ // add the content to the Tree
222+ err = root .AddUpdatesRecursive (ctx , intent .GetUpdates (), flagNew )
223+ if err != nil {
224+ return nil , err
225+ }
234226
235- // add the old intent contents paths to the involvedPaths slice
236- involvedPaths .Join (oldIntentContent .ToPathSet ())
237- // add the new intent contents paths to the involvedPaths slice
238- involvedPaths .Join (intent .GetUpdates ().ToPathSet ())
227+ // add the explicit delete entries
228+ root .AddExplicitDeletes (intent .GetName (), intent .GetPriority (), intent .GetDeletes ())
229+ }
239230 }
240231
241232 les := tree.LeafVariantSlice {}
0 commit comments