Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate insert into namespace_statistics during v2 migration #5160

Open
aryairani opened this issue Jun 30, 2024 · 0 comments
Open

duplicate insert into namespace_statistics during v2 migration #5160

aryairani opened this issue Jun 30, 2024 · 0 comments
Labels

Comments

@aryairani
Copy link
Contributor

aryairani commented Jun 30, 2024

Describe and demonstrate the bug

$ git clone https://github.com/DataKinds/unison bug
$ ucm -c bug

📋 I backed up your codebase to bug/bug/.unison/v2/unison.sqlite3.v1.1719713918
⚠️  Please close all other ucm processes and wait for the migration to complete before interacting with your codebase.
Press <enter> to start the migration once all other ucm processes are shutdown...

🔨 Migrating codebase to version 2...
Starting codebase migration. This may take a while, it's a good time to make some tea ☕️
Updating Namespace Root...
 🏗  138 / ~6577 entities migrated. 🚧Uh oh, an unexpected exception brought the process down! That should never happen. Please file a bug report.

Here's a stringy rendering of the exception:

  SqliteQueryException {sql = "INSERT INTO namespace_statistics ( namespace_hash_id, num_contained_terms, num_contained_types, num_contained_patches ) VALUES (?, ?, ?, ?)", params = [SQLInteger 6776,SQLInteger 0,SQLInteger 0,SQLInteger 0], exception = SQLite3 returned ErrorConstraint while attempting to perform step: UNIQUE constraint failed: namespace_statistics.namespace_hash_id, callStack = [], connection = Connection { name = "main", file = "bug/.unison/v2/unison.sqlite3" }, threadId = ThreadId 12}

Environment (please complete the following information):
v0.5.23

Additional context
blocks my attempted repro of #2859

@aryairani aryairani added the bug label Jun 30, 2024
@aryairani aryairani changed the title crash during migration v1->v2 duplicate insert into namespace_statistics? Jun 30, 2024
@aryairani aryairani changed the title duplicate insert into namespace_statistics? duplicate insert into namespace_statistics during v2 migration Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant