The site may be down within the period of 1-3am ET for maintenance

2 years ago by Ategon to c/meta

Doing another round of maintenance to fix some issues related to posts

It might only be down for a bit within that window but im giving myself two hours in case some things take longer than I expect

Ategon 4 points 2 years ago

Sites back, communities that previously had their community page not vieweable are now viewable

An example of this is https://programming.dev/c/a11y

Basically what I did was before the maintenance exported every single post in the post table and use a js script to check for duplicate ap_ids (checking using sql itself didnt work due to broken indices so it was always missing some). Then I generated sql statements to remove duplicate posts that had higher ids than the other posts theyre a duplicate of. Ran all those during maintenance and since all duplicate ap_ids were removed I could now reindex the table to fix the broken indices

Did the same for communities after the posts (but also did some statements to move posts from one version of the community to the other)

Site might be slow for a tiny bit as it processes the 2 hour of activities that were generated while it was down

path: 0 14426952, hotness: undefined, score: 4, children: 3
Blaze 1 point 2 years ago

Well done

path: 0 14426952 14431384, hotness: undefined, score: 1, children: 0
Nothing4You 1 point 2 years ago

Then I generated sql statements to remove duplicate posts that had higher ids than the other posts theyre a duplicate of

i assume this was done after updating the other tables referencing this table, such as comments, votes, saved posts, as previously discussed on matrix?

while it may be omitted here for simplicity, it can be dangerous to not mention that for others that might find this in the future if they experience index corruptions on their own if they don't fix all references, as that would result in data loss.

path: 0 14426952 14431293, hotness: undefined, score: 1, children: 1
Ategon 1 point 2 years ago

No votes or comments were connected to the duplicates but yeah if there was some you would move it over to the other one

The posts that had comments were the posts that were uniquely on the other community and those moved over with the post when I updated the community of the post

path: 0 14426952 14431293 14434941, hotness: undefined, score: 1, children: 0
meta
meta

@programming.dev

login for more options
2781
278
29

Welcome to the Programming.Dev meta community!

This is a community for discussing things about programming.dev itself. Things like announcements, site help posts, site questions, etc. are all welcome here.

Links

Credits

  • Icon base by Lorc under CC BY 3.0 with modifications to add a gradient

go to feed...