Skip to content

Commit

Permalink
Switch number of rels returned on error
Browse files Browse the repository at this point in the history
  • Loading branch information
josephschorr committed Dec 5, 2024
1 parent 1f5368d commit d749ed4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/datastore/mysql/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (mds *Datastore) DeleteBeforeTx(
func (mds *Datastore) DeleteExpiredRels(ctx context.Context) (int64, error) {
now, err := mds.Now(ctx)
if err != nil {
return -1, err
return 0, err
}

return mds.batchDelete(
Expand Down
2 changes: 1 addition & 1 deletion internal/datastore/postgres/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (pgd *pgDatastore) TxIDBefore(ctx context.Context, before time.Time) (datas
func (pgd *pgDatastore) DeleteExpiredRels(ctx context.Context) (int64, error) {
now, err := pgd.Now(ctx)
if err != nil {
return -1, err
return 0, err
}

return pgd.batchDelete(
Expand Down

0 comments on commit d749ed4

Please sign in to comment.