Skip to content

Factor out database initialization code from SA #8874

Description

@jsha

In sa/database.go, we have InitWrappedDB, which does a variety of things, in particular:

  • Sets up the borp type<->table mapping.
  • Sets connection lifetimes and limits from a cmd.DBConfig.
  • Configures metrics.
  • Calls db.NewWrappedMap (annotates DB errors with extra info).

We should factor InitWrappedDB into its own package, for use with any database operations that might not want the same borp type<->table mapping as the SA, or that might not want to depend on the SA.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions