Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
Signed-off-by: Kartikay <[email protected]>
  • Loading branch information
kartikaysaxena committed Jan 31, 2025
1 parent f95e9b0 commit d7f80a8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/datastore/mysql/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ func (mds *Datastore) loadRelationshipChanges(ctx context.Context, afterRevision
return
}
}

}
if err = rows.Err(); err != nil {
return
Expand Down Expand Up @@ -335,12 +334,11 @@ func (mds *Datastore) loadNamespaceChanges(ctx context.Context, afterRevision ui
return
}
}
if createdTxn > afterRevision && createdTxn <= newRevision {
if deletedTxn > afterRevision && deletedTxn <= newRevision {
if err = stagedChanges.AddDeletedNamespace(ctx, revisions.NewForTransactionID(deletedTxn), loaded.Name); err != nil {
return
}
}

}

if err = rows.Err(); err != nil {
Expand Down Expand Up @@ -400,7 +398,7 @@ func (mds *Datastore) loadCaveatChanges(ctx context.Context, afterRevision uint6
return
}
}
if createdTxn > afterRevision && createdTxn <= newRevision {
if deletedTxn > afterRevision && deletedTxn <= newRevision {
if err = stagedChanges.AddDeletedCaveat(ctx, revisions.NewForTransactionID(deletedTxn), loaded.Name); err != nil {
return
}
Expand Down

0 comments on commit d7f80a8

Please sign in to comment.