Skip to content

Add unique index for route bindings#4629

Merged
johha merged 1 commit intomainfrom
route-bindings-unique-index
Nov 3, 2025
Merged

Add unique index for route bindings#4629
johha merged 1 commit intomainfrom
route-bindings-unique-index

Conversation

@johha
Copy link
Copy Markdown
Contributor

@johha johha commented Oct 29, 2025

In case of concurrent requests/inserts duplicated entries in the route_bindings table might be created. This change adds a new migration which removes duplicates and adds a unique constraint. Additionally the error handling is adjusted so that UniqueConstraintViolation errors are rescued correctly.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

In case of concurrent requests/inserts duplicated entries in the `route_bindings` table might be created.
This change adds a new migration which removes duplicates and adds a unique constraint.
Additionally the error handling is adjusted so that `UniqueConstraintViolation` errors are rescued correctly.
@johha johha marked this pull request as ready for review October 29, 2025 16:19
@johha johha requested a review from a team October 29, 2025 16:20
@johha johha merged commit 91e0b9d into main Nov 3, 2025
16 checks passed
@johha johha deleted the route-bindings-unique-index branch November 3, 2025 07:08
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Nov 3, 2025
Changes in cloud_controller_ng:

- Add unique index for route bindings
    PR: cloudfoundry/cloud_controller_ng#4629
    Author: Johannes Haass <johannes.haass@sap.com>

- Add unique constraint for sidecar process types
    PR: cloudfoundry/cloud_controller_ng#4632
    Author: Johannes Haass <johannes.haass@sap.com>
sethboyles pushed a commit to atanas-attodorov-wq/cloud_controller_ng that referenced this pull request Dec 11, 2025
In case of concurrent requests/inserts duplicated entries in the `route_bindings` table might be created.
This change adds a new migration which removes duplicates and adds a unique constraint.
Additionally the error handling is adjusted so that `UniqueConstraintViolation` errors are rescued correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants