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

Handle internal relationships referencing rows that don't exist #14695

Merged
merged 6 commits into from
Oct 9, 2024

Conversation

mike12345567
Copy link
Collaborator

Description

Fixing an issue with corrupt relationship records referencing rows which don't exist, this is a temporary measure as these relationships should be cleaned up correctly but for now ignore any which reference rows which no longer exist.

…ich don't exist, this is a temporary measure as these relationships should be cleaned up correctly but for now ignore any which reference rows which no longer exist.
@mike12345567 mike12345567 self-assigned this Oct 3, 2024
@mike12345567 mike12345567 requested a review from a team as a code owner October 3, 2024 15:11
@mike12345567 mike12345567 requested review from adrinr and removed request for a team October 3, 2024 15:11
@github-actions github-actions bot added firestorm Data/Infra/Revenue Team size/s labels Oct 3, 2024
Comment on lines +224 to +228
// check all the related rows exist
const foundRecords = await this._db.getMultiple(
links.map(l => l.id),
{ allowMissing: true, excludeDocs: true }
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm confused, this doesn't seem to line up with the PR description. It looks like you're checking for existing links to a document on save, not looking for links to documents that don't exist?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we're deciding whether or not the validation is correct by getting a list of rows, the way the system works it retrieves a list of link documents, this then makes sure those link documents reference something valid.

@samwho samwho enabled auto-merge October 4, 2024 13:30
@samwho samwho merged commit 9812e88 into master Oct 9, 2024
12 checks passed
@samwho samwho deleted the fix/related-rows-dont-exist branch October 9, 2024 11:30
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
firestorm Data/Infra/Revenue Team size/s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants