-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
Drop reference_sha
column
#3083
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3083 +/- ##
==========================================
- Coverage 66.44% 66.39% -0.05%
==========================================
Files 497 499 +2
Lines 53746 53792 +46
==========================================
+ Hits 35710 35717 +7
- Misses 14486 14545 +59
+ Partials 3550 3530 -20
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
return fmt.Errorf("failed to query duplicate event ids") | ||
} | ||
if count > 0 { | ||
return fmt.Errorf("unable to drop column, as there are duplicate event ids") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unfortunate as it would prevent people from upgrading Dendrite. Can we instead mix together the event nids for the affected rows? E.g given:
event_id | sha256 | nids
$foo | abc123 | [2,4]
$foo | def456 | [2,3]
replace it with:
$foo | [2,3,4]
?
Up: deltas.UpDropEventReferenceSHAPrevEvents, | ||
}, | ||
}...) | ||
logrus.Infof("cName: %s", cName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug logging?
... as they could fail if there are duplicate events in `roomserver_previous_events`. This fixes the migration by trying to combine the `event_nids` if possible (same room) as mentioned by @kegsay in #3083 (comment)
Companion PR to matrix-org/gomatrixserverlib#383