superseriousbusiness / gotosocial

Fast, fun, small ActivityPub server.
https://docs.gotosocial.org
GNU Affero General Public License v3.0
3.81k stars 330 forks source link

[bug/v0.17.0-rc1] MigrateDMsToConversations: PopulateMention: error populating mention target account: sql: no rows in result set #3347

Closed mirabilos closed 3 weeks ago

mirabilos commented 1 month ago

Describe the bug with a clear and concise description of what the bug is.

During the -rc migrations, I’m seeing:

timestamp="2024-09-24T19:22:33.496Z" func=conversations.(*Processor).MigrateDMsToConversations level=INFO msg="migrating 100 DMs starting after 01H3Z29JVWXBAKEZ125VCK6S9S"
timestamp="2024-09-24T19:22:33.533Z" func=bundb.(*mentionDB).GetMentions.func3 level=ERROR msg="error populating mention 01FG8Z9E8XBJ3KESH6X1KDZDXH: PopulateMention: error populating mention target account: sql: no rows in result set"
timestamp="2024-09-24T19:22:33.535Z" func=bundb.(*mentionDB).GetMentions.func3 level=ERROR msg="error populating mention 01APF70CPH9KZ5A96164ZHQZ2Z: PopulateMention: error populating mention target account: sql: no rows in result set"
[…]

My guess is that these are old messages where the other instance got defederated, probably because it ceased to exist (I recall someone setting up a new instance, using it for two weeks or so, then deciding he didn’t like the domain name used and redid the entire thing, so ofc I nuked the old instance by domain-blocking it, then removing the now-useless block for the now-nōnexistent domain, and I know I’ve exchanged DMs with him).

I’m also not sure whether this has caused the/that migration to fail. It continued on with…

[…]
timestamp="2024-09-24T19:22:33.556Z" func=bundb.(*statusDB).GetStatusesByIDs.func3 level=ERROR msg="error populating status 01H4CBY9HXH4MTE4ZSZ272Z0EH: PopulateStatus: error populating status parent author: sql: no rows in result set"
timestamp="2024-09-24T19:22:33.651Z" func=conversations.(*Processor).MigrateDMsToConversations level=INFO msg="migrating 100 DMs starting after 01H5A132F2SK32T6TQXARW7Q3H"
timestamp="2024-09-24T19:22:33.736Z" func=conversations.(*Processor).MigrateDMsToConversations level=INFO msg="migrating 100 DMs starting after 01H5TSY96N4NH917RCEDE1G92A"
[…]

… so the process at least didn’t abort.


I also see:

timestamp="2024-09-24T19:22:49.699Z" func=conversations.(*Processor).UpdateConversationsForStatus level=ERROR msg="error creating or updating conversation 01J8JQS0F373HN0HQ742ND7XXZ for status 01HSZ4CNZA5R59WV613GFKA3WT and account 01GS55SW7VWYN3BFRYCX5NW526: already exists"
timestamp="2024-09-24T19:22:49.710Z" func=conversations.(*Processor).UpdateConversationsForStatus level=ERROR msg="error creating or updating conversation 01J8JQS0FEV6R2SXDNNV13S13J for status 01HSZ4H9DSZ2M3TR9XM869XMC4 and account 01GS55SW7VWYN3BFRYCX5NW526: already exists"

I have no guessplanation for these two.

What's your GoToSocial Version?

0.17.0-rc1+git-de72855 🦥

GoToSocial Arch

amd64 binary

What happened?

No response

What you expected to happen?

No response

How to reproduce it?

No response

Anything else we need to know?

No response

tsmethurst commented 1 month ago

Huh interesting thanks! I'll take a look before proper release. If you made it to those advanced migrations that means all the fundamental ones ran fine, so you should be good to go :) Cheers for the report.

mirabilos commented 1 month ago

Instance also seems to work fine. On second start, it runs no further migrations.

tsmethurst commented 3 weeks ago

I'm gonna close this since it's not really that important, mostly just something being logged as "error" when in reality it's basically a "debug" level log at best, and it doesn't get in the way of having a functioning instance.