Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 0 additions & 8 deletions cmd/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ func (c *ingestCmd) Command() *cobra.Command {
FlagDefault: 100,
Required: false,
},
{
Name: "catchup-threshold",
Usage: "Number of ledgers behind network tip that triggers fast catchup via backfilling. Defaults to 100.",
OptType: types.Int,
ConfigKey: &cfg.CatchupThreshold,
FlagDefault: 100,
Required: false,
},
{
Name: "archive-url",
Usage: "Archive URL for history archives",
Expand Down
4 changes: 0 additions & 4 deletions internal/ingest/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@
// BackfillDBInsertBatchSize is the number of ledgers to process before flushing to DB.
// Defaults to 50. Lower values reduce RAM usage at cost of more DB transactions.
BackfillDBInsertBatchSize int
// CatchupThreshold is the number of ledgers behind network tip that triggers fast catchup.
// Defaults to 100.
CatchupThreshold int
// ChunkInterval sets the TimescaleDB chunk time interval for hypertables.
// Only affects future chunks. Uses PostgreSQL INTERVAL syntax (e.g., "1 day", "7 days").
ChunkInterval string
Expand Down Expand Up @@ -146,7 +143,7 @@
}

if cfg.IngestionMode == services.IngestionModeLive {
if err := configureHypertableSettings(ctx, dbConnectionPool, cfg.ChunkInterval, cfg.RetentionPeriod, cfg.OldestLedgerCursorName, cfg.CompressionScheduleInterval, cfg.CompressAfter, cfg.MaxChunksToCompress); err != nil {

Check failure on line 146 in internal/ingest/ingest.go

View workflow job for this annotation

GitHub Actions / check

declaration of "err" shadows declaration at line 140
return nil, fmt.Errorf("configuring hypertable settings: %w", err)
}
}
Expand Down Expand Up @@ -221,7 +218,6 @@
BackfillWorkers: cfg.BackfillWorkers,
BackfillBatchSize: cfg.BackfillBatchSize,
BackfillDBInsertBatchSize: cfg.BackfillDBInsertBatchSize,
CatchupThreshold: cfg.CatchupThreshold,
})
if err != nil {
return nil, fmt.Errorf("instantiating ingest service: %w", err)
Expand Down
102 changes: 0 additions & 102 deletions internal/integrationtests/catchup_test.go

This file was deleted.

7 changes: 0 additions & 7 deletions internal/integrationtests/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ func TestIntegrationTests(t *testing.T) {
})
})

// Test catchup backfilling during live ingestion
t.Run("CatchupTestSuite", func(t *testing.T) {
suite.Run(t, &CatchupTestSuite{
testEnv: testEnv,
})
})

// Phase 1: Validate balances from checkpoint before fixture transactions
t.Run("AccountBalancesAfterCheckpointTestSuite", func(t *testing.T) {
suite.Run(t, &AccountBalancesAfterCheckpointTestSuite{
Expand Down
5 changes: 1 addition & 4 deletions internal/services/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ type IngestServiceConfig struct {
BackfillWorkers int
BackfillBatchSize int
BackfillDBInsertBatchSize int
CatchupThreshold int
}

// generateAdvisoryLockID creates a deterministic advisory lock ID based on the network name.
Expand Down Expand Up @@ -115,7 +114,6 @@ type ingestService struct {
backfillPool pond.Pool
backfillBatchSize uint32
backfillDBInsertBatchSize uint32
catchupThreshold uint32
knownContractIDs set.Set[string]
}

Expand Down Expand Up @@ -154,7 +152,6 @@ func NewIngestService(cfg IngestServiceConfig) (*ingestService, error) {
backfillPool: backfillPool,
backfillBatchSize: uint32(cfg.BackfillBatchSize),
backfillDBInsertBatchSize: uint32(cfg.BackfillDBInsertBatchSize),
catchupThreshold: uint32(cfg.CatchupThreshold),
knownContractIDs: set.NewSet[string](),
}, nil
}
Expand All @@ -167,7 +164,7 @@ func (m *ingestService) Run(ctx context.Context, startLedger uint32, endLedger u
case IngestionModeLive:
return m.startLiveIngestion(ctx)
case IngestionModeBackfill:
return m.startBackfilling(ctx, startLedger, endLedger, BackfillModeHistorical)
return m.startBackfilling(ctx, startLedger, endLedger)
default:
return fmt.Errorf("unsupported ingestion mode %q, must be %q or %q", m.ingestionMode, IngestionModeLive, IngestionModeBackfill)
}
Expand Down
Loading
Loading