Revert "fix(mirror): ensure multiple runs (#9899)"

This reverts commit bb56775435.
This commit is contained in:
adlerhurst
2025-05-19 17:14:22 +02:00
parent c0d0f5bb41
commit bbdb3f358f
3 changed files with 1 additions and 10 deletions

View File

@@ -8,7 +8,6 @@ import (
"io"
"time"
"github.com/jackc/pgx/v5/pgconn"
"github.com/jackc/pgx/v5/stdlib"
"github.com/shopspring/decimal"
"github.com/spf13/cobra"
@@ -173,10 +172,6 @@ func copyEvents(ctx context.Context, source, dest *db.DB, bulkSize uint32) {
tag, err := conn.PgConn().CopyFrom(ctx, reader, "COPY eventstore.events2 FROM STDIN")
eventCount = tag.RowsAffected()
if err != nil {
pgErr := new(pgconn.PgError)
errors.As(err, &pgErr)
logging.WithError(err).WithField("pg_err_details", pgErr.Detail).Error("unable to copy events into destination")
return zerrors.ThrowUnknown(err, "MIGRA-DTHi7", "unable to copy events into destination")
}

View File

@@ -120,10 +120,7 @@ func projections(
logging.OnError(err).Fatal("unable create static storage")
config.Eventstore.Querier = old_es.NewCRDB(client)
newES := new_es.NewEventstore(client)
config.Eventstore.Pusher = newES
config.Eventstore.Searcher = newES
config.Eventstore.Pusher = new_es.NewEventstore(client)
es := eventstore.NewEventstore(config.Eventstore)
esV4 := es_v4.NewEventstoreFromOne(es_v4_pg.New(client, &es_v4_pg.Config{
MaxRetries: config.Eventstore.MaxRetries,

View File

@@ -36,7 +36,6 @@ func (p *LastSuccessfulMirror) Filter() *eventstore.Filter {
),
eventstore.FilterPagination(
eventstore.Descending(),
eventstore.Limit(1),
),
)
}