Skip to content

Conversation

@Centril
Copy link
Contributor

@Centril Centril commented Jul 3, 2025

Description of Changes

Currently, before this PR, when checking if the index-to-add is unique, we consider all constraints in the module.
This caused a bug where we'd let the unique constraints of another table affect the table-to-alter.

Fixes #2761.

API and ABI breaking changes

None

Expected complexity level and risk

2?

Testing

A regression test is added in the last commit.
Also verified that a module with the last repro in the reducer doesn't work on master and does with the PR.

@Centril Centril requested a review from kazimuth July 3, 2025 20:35
@bfops bfops added the bugfix Fixes something that was expected to work differently label Jul 3, 2025
Copy link
Contributor

@kim kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Centril Centril added this pull request to the merge queue Jul 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 4, 2025
@Centril Centril added this pull request to the merge queue Jul 4, 2025
Merged via the queue into master with commit 6f5e33a Jul 4, 2025
23 checks passed
@Centril Centril deleted the centril/fix-add-index-unique-handling branch July 4, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes something that was expected to work differently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SpacetimeDB daemon panics and crashes on updating a module re-creating the same index

4 participants