아, 이 부분을 놓치고 있었네요… 즉, 일관되게 뭔가 잘못된 것입니다. 이는 서버가 클라이언트에게 새로운 토픽이 여러 개 있다고 알려주지만, 실제로 들어가 보면 해당 토픽이 없다는 뜻입니다.
이전에도 예약 게시글(scheduled posts) 때문에 이런 일이 발생한 적이 있습니다… 예약 게시글을 사용하시나요? 이를 디버깅하는 것은 다소 까다로운데, 클라이언트가 새 것으로 인식하는 topic_id 목록을 확인해야 합니다.
지금 이 문제가 발생하고 있다면 다음을 실행해 보세요:
SELECT
u.id AS user_id,
topics.id AS topic_id,
topics.created_at,
highest_staff_post_number highest_post_number,
last_read_post_number,
c.id AS category_id,
tu.notification_level
FROM topics
JOIN users u on u.id = 1
JOIN user_stats AS us ON us.user_id = u.id
JOIN user_options AS uo ON uo.user_id = u.id
JOIN categories c ON c.id = topics.category_id
LEFT JOIN topic_users tu ON tu.topic_id = topics.id AND tu.user_id = u.id
LEFT JOIN category_users ON category_users.category_id = topics.category_id AND category_users.user_id = 1
WHERE u.id = 1 AND
topics.archetype <> 'private_message' AND
((1=0) OR ("topics"."deleted_at" IS NULL AND topics.created_at >= GREATEST(CASE
WHEN COALESCE(uo.new_topic_duration_minutes, 2880) = -1 THEN u.created_at
WHEN COALESCE(uo.new_topic_duration_minutes, 2880) = -2 THEN COALESCE(u.previous_visit_at,u.created_at)
ELSE ('2020-05-13 00:36:29.100619'::timestamp - INTERVAL '1 MINUTE' * COALESCE(uo.new_topic_duration_minutes, 2880))
END, us.new_since, '2020-05-07 14:46:17') AND tu.last_read_post_number IS NULL AND COALESCE(tu.notification_level, 2) >= 2 AND topics.created_at > '2020-05-07 14:46:17' AND (category_users.last_seen_at IS NULL OR topics.created_at > category_users.last_seen_at))) AND
topics.deleted_at IS NULL AND
NOT (
last_read_post_number IS NULL AND
COALESCE(category_users.notification_level, 1) = 0
)
UNION ALL
SELECT
u.id AS user_id,
topics.id AS topic_id,
topics.created_at,
highest_staff_post_number highest_post_number,
last_read_post_number,
c.id AS category_id,
tu.notification_level
FROM topics
JOIN users u on u.id = 1
JOIN user_stats AS us ON us.user_id = u.id
JOIN user_options AS uo ON uo.user_id = u.id
JOIN categories c ON c.id = topics.category_id
LEFT JOIN topic_users tu ON tu.topic_id = topics.id AND tu.user_id = u.id
LEFT JOIN category_users ON category_users.category_id = topics.category_id AND category_users.user_id = 1
WHERE u.id = 1 AND
topics.updated_at >= us.first_unread_at AND
topics.archetype <> 'private_message' AND
(("topics"."deleted_at" IS NULL AND tu.last_read_post_number < topics.highest_staff_post_number AND COALESCE(tu.notification_level, 1) >= 2) OR (1=0)) AND
topics.deleted_at IS NULL AND
NOT (
last_read_post_number IS NULL AND
COALESCE(category_users.notification_level, 1) = 0
)
user_id = 1 부분을 사용자의 ID로 대체하세요 (select id, username from users where username = 'yourusername'를 실행하여 찾을 수 있습니다).
이 문제가 계속 발생한다면 data explorer를 설치해서 어떤 일이 일어나고 있는지 확인해 주시겠습니까?