From 31671f67bc50a29c008d6d69229124f16d10f4d1 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Tue, 19 Sep 2023 10:58:08 -0700 Subject: [PATCH 1/2] processRepo callback needs deltastore bs for gap fill --- repomgr/repomgr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repomgr/repomgr.go b/repomgr/repomgr.go index 2b8c869e7..347cf66df 100644 --- a/repomgr/repomgr.go +++ b/repomgr/repomgr.go @@ -884,7 +884,7 @@ func (rm *RepoManager) processNewRepo(ctx context.Context, user models.Uid, r io return ds.CloseWithRoot(ctx, root, nrev) } - if err := cb(ctx, root, finish, membs); err != nil { + if err := cb(ctx, root, finish, ds); err != nil { return fmt.Errorf("cb errored root: %s, rev: %s: %w", root, *rev, err) } From 2081afecb20b9c9d993b9a52dead2b3a8e762c81 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Tue, 19 Sep 2023 11:29:49 -0700 Subject: [PATCH 2/2] extra logs --- cmd/bigsky/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/bigsky/main.go b/cmd/bigsky/main.go index f38f98dc3..2cd6105eb 100644 --- a/cmd/bigsky/main.go +++ b/cmd/bigsky/main.go @@ -172,7 +172,8 @@ func Bigsky(cctx *cli.Context) error { // https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace#readme-environment-variables // At a minimum, you need to set // OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 - if os.Getenv("OTEL_EXPORTER_OTLP_ENDPOINT") != "" { + if ep := os.Getenv("OTEL_EXPORTER_OTLP_ENDPOINT"); ep != "" { + log.Infow("setting up trace exporter", "endpoint", ep) ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -208,12 +209,14 @@ func Bigsky(cctx *cli.Context) error { return err } + log.Infow("setting up main database") dburl := cctx.String("db-url") db, err := cliutil.SetupDatabase(dburl, cctx.Int("max-metadb-connections")) if err != nil { return err } + log.Infow("setting up carstore database") csdburl := cctx.String("carstore-db-url") csdb, err := cliutil.SetupDatabase(csdburl, cctx.Int("max-carstore-connections")) if err != nil { @@ -255,6 +258,7 @@ func Bigsky(cctx *cli.Context) error { var persister events.EventPersistence if dpd := cctx.String("disk-persister-dir"); dpd != "" { + log.Infow("setting up disk persister") dp, err := events.NewDiskPersistence(dpd, "", db, events.DefaultDiskPersistOptions()) if err != nil { return fmt.Errorf("setting up disk persister: %w", err) @@ -317,6 +321,7 @@ func Bigsky(cctx *cli.Context) error { } } + log.Infow("constructing bgs") bgs, err := bgs.NewBGS(db, ix, repoman, evtman, cachedidr, blobstore, hr, !cctx.Bool("crawl-insecure-ws")) if err != nil { return err @@ -342,6 +347,7 @@ func Bigsky(cctx *cli.Context) error { bgsErr <- err }() + log.Infow("startup complete") select { case <-signals: log.Info("received shutdown signal")