Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions tasks/pdpv0/watch_piece_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,11 @@ func processPendingCleanup(ctx context.Context, db *harmonydb.DB, ethClient *eth
}

if !live {
// XXX(Kubuxu): commented out as this has lead to proving failures
//_, err := db.Exec(ctx, `DELETE FROM pdp_data_set_pieces WHERE data_set = $1 AND piece_id = $2`, piece.DataSetID, piece.PieceID)
err = nil
_, err = db.Exec(ctx, `DELETE FROM pdp_data_set_pieces WHERE data_set = $1 AND piece_id = $2 AND removed = TRUE`, piece.DataSetID, piece.PieceID)
if err != nil {
return xerrors.Errorf("failed to delete piece %d: %w", piece.PieceID, err)
}
log.Infow("deleted confirmed-removed piece from DB", "dataSetId", piece.DataSetID, "pieceId", piece.PieceID)
}
}

Expand Down