this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

More perf tuning

Jaz 573f8379 660d4f45

+25 -23
+25 -23
cmd/linear/main.go
··· 158 158 opts := backfill.DefaultBackfillerOptions() 159 159 opts.GlobalRecordCreateConcurrency = 100_000 160 160 opts.PerPDSSyncsPerSecond = 10 161 - opts.PerPDSBackfillConcurrency = 50 161 + opts.PerPDSBackfillConcurrency = 30 162 162 163 163 bf := backfill.NewBackfiller("linear-backfiller-v2", store, linear.handleCreate, opts) 164 164 ··· 216 216 go func(pds string) { 217 217 logger.Info("enqueuing PDS for backfill", "pds", pds) 218 218 219 - xrpcc := xrpc.Client{} 219 + xrpcc := xrpc.Client{ 220 + Client: &http.Client{ 221 + Timeout: 5 * time.Second, 222 + }, 223 + } 220 224 xrpcc.Host = fmt.Sprintf("https://%s", pds) 221 225 222 226 listLimiter := rate.NewLimiter(5, 1) ··· 371 375 372 376 recordsProcessed := atomic.Int64{} 373 377 374 - for range 10 { 375 - wg.Add(1) 376 - go func() { 377 - defer wg.Done() 378 - recs := 0 379 - for { 380 - select { 381 - case <-lin.teardown: 382 - log.Info("received shutdown signal, closing writer") 383 - return 384 - case line := <-lin.outChan: 385 - if _, err := lin.out.Write(line); err != nil { 386 - log.Error("failed to write line to output file", "err", err) 387 - } 388 - recs++ 389 - if recs%1000 == 0 { 390 - recordsProcessed.Add(int64(recs)) 391 - recs = 0 392 - } 378 + wg.Add(1) 379 + go func() { 380 + defer wg.Done() 381 + recs := 0 382 + for { 383 + select { 384 + case <-lin.teardown: 385 + log.Info("received shutdown signal, closing writer") 386 + return 387 + case line := <-lin.outChan: 388 + if _, err := lin.out.Write(line); err != nil { 389 + log.Error("failed to write line to output file", "err", err) 390 + } 391 + recs++ 392 + if recs%1000 == 0 { 393 + recordsProcessed.Add(int64(recs)) 394 + recs = 0 393 395 } 394 396 } 395 - }() 396 - } 397 + } 398 + }() 397 399 398 400 go func() { 399 401 ticker := time.NewTicker(10 * time.Second)