Urgent: site down after rebuild

Hi,

I urgently need some help - I did an upgrade from /admin/upgrade today, but the process never finished. I then restarted Discourse and tried a ./launcher rebuild app from the command line, but I keep getting the following error:

	SET first_unread_at = u.created_at
	FROM users u
	WHERE u.id = us.user_id
	
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Index name 'index_topics_on_updated_at_public' on table 'topics' already exists

The problem remains after disabling all plugins. Our site is down right now, I’d appreciate some help to diagnose and fix this. Thanks!

Update: I found that I could restart Discourse with ./launcher start app, but I’m not entirely sure of the current state of my instance.

Update: After starting the app, I went into psql and deleted the index that was mentioned in the error. After a rebuild, the exact same error came up again.

This should fix it, but you will need to wait till tests passed

if you nuked the index though it should surely pass, but maybe you did not nuke it properly… I don’t know.

5 Likes

:+1:thanks Sam!

maybe you did not nuke it properly

That’s very possible, Postgres is still new to me :slight_smile:

wait till tests passed

How will I know when that is?

1 Like

When the commit appears in this list:

https://github.com/discourse/discourse/commits/tests-passed

3 Likes

It’s in tests-passed

6 Likes

Thanks to @pmusaraj our faster build times are paying off :smiling_face_with_three_hearts:

5 Likes

My rebuild just passed the part where it creates the index. Thanks, gentlemen!

5 Likes