Move posts 500 error due to constraint

Hi,

A topic started to drift, so I split it to a new topic. Unfortunately, it’s now going back on topic, so I tried to move the relevant posts back to the original one. I’m getting a 500 error.

It seems a constraint is failing:

2019-09-21 14:39:48.805 UTC [26689] discourse@discourse ERROR:  duplicate key value violates unique constraint "post_timings_unique"`
`2019-09-21 14:39:48.805 UTC [26689] discourse@discourse DETAIL:  Key (topic_id, post_number, user_id)=(9957, 79, 1) already exists.`
`2019-09-21 14:39:48.805 UTC [26689] discourse@discourse STATEMENT:  UPDATE post_timings pt
        SET topic_id    = mp.new_topic_id,
            post_number = mp.new_post_number
        FROM moved_posts mp
        WHERE pt.topic_id = mp.old_topic_id
          AND pt.post_number = mp.old_post_number
          AND mp.old_post_id = mp.new_post_id`
        
`2019-09-21 14:39:48.806 UTC [26689] discourse@discourse ERROR:  current transaction is aborted, commands ignored until end of transaction block`
`2019-09-21 14:39:48.806 UTC [26689] discourse@discourse STATEMENT:  DROP TABLE IF EXISTS moved_posts

명확한 재현 단계를 가지고 계신가요? 새 주제에서 재현해 보실 수 있을까요?

2개의 좋아요

이 문제는 FIX: Existing post timings could prevent moving posts · discourse/discourse@bee000b · GitHub 에서 수정되었을 것으로 확신합니다.
@nmcgovern 여전히 문제를 재현할 수 있다면 다시 열도록 표시해 주세요.

6개의 좋아요