Fredrik Adelöw 36514a23d6 fix(catalog-backend): use two-phase dedup in search migration to avoid full-table re-scans
The original single-pass CTE window-function DELETE re-scanned every row
on each invocation — including the idempotent "nothing to do" case which
took over 4 minutes on a 14 M-row table, and timed out the DB proxy on
the dirty case (~217 s for 722 k duplicates).

Replace it with two improvements:

1. Fast path: if the UNIQUE index already exists and is valid, skip dedup
   entirely. A valid unique index is a proof-of-no-duplicates. This makes
   migration startup essentially free for installations that prepare the
   index manually beforehand (as documented in the migration comment).

2. Two-phase dedup when dedup is needed: Phase 1 does one full-table scan
   to collect all duplicate ctids into a temp table (~60 s on 14 M rows).
   Phase 2 drains that temp table in 10 k-row batches via cheap ctid
   lookups with no further full-table scans (~5 s for 722 k rows). Total
   ~65 s dirty vs >217 s+ before, and ~35 ms clean vs 4+ minutes before.

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 16:52:44 +02:00
2026-05-05 14:57:07 +00:00

headline

Backstage

English | 한국어 | 中文版 | Français

License CNCF Status Discord Code style Codecov OpenSSF Best Practices OpenSSF Scorecard

What is Backstage?

Backstage is an open source framework for building developer portals. Powered by a centralized software catalog, Backstage restores order to your microservices and infrastructure and enables your product teams to ship high-quality code quickly without compromising autonomy.

Backstage unifies all your infrastructure tooling, services, and documentation to create a streamlined development environment from end to end.

software-catalog

Out of the box, Backstage includes:

  • Backstage Software Catalog for managing all your software such as microservices, libraries, data pipelines, websites, and ML models
  • Backstage Software Templates for quickly spinning up new projects and standardizing your tooling with your organizations best practices
  • Backstage TechDocs for making it easy to create, maintain, find, and use technical documentation, using a "docs like code" approach
  • Plus, a growing ecosystem of open source plugins that further expand Backstages customizability and functionality

Backstage was created by Spotify but is now hosted by the Cloud Native Computing Foundation (CNCF) as an Incubation level project. For more information, see the announcement.

Project roadmap

For information about the detailed project roadmap including delivered milestones, see the Roadmap.

Getting Started

To start using Backstage, see the Getting Started documentation.

Documentation

The documentation of Backstage includes:

Community

To engage with our community, you can use the following resources:

Governance

See the GOVERNANCE.md document in the backstage/community repository.

License

Copyright 2020-2026 © The Backstage Authors. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page: https://www.linuxfoundation.org/trademark-usage

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Security

Please report sensitive security issues using Spotify's bug-bounty program rather than GitHub.

For further details, see our complete security release process.

S
Description
Copy of backstage/backstage from Spotify Backstage
Readme Apache-2.0 1.3 GiB
Languages
TypeScript 93.9%
MDX 2%
JavaScript 2%
CSS 1.5%
Handlebars 0.3%