RSS Feed/News Thread reply count is incorrect after soft-deleting large number of posts in a long enough thread

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
31,917
Points
823

Reputation:

If a user deletes a large number of individual posts in a sufficiently long thread, there is a race for xf_thread.reply_count being set to the actual correct value. This can result in the thread being "broken" where position numbers are re-used.

This is because Thread::postRemoved() acts on the existing loaded object when adjusting reply_count, and not the actual database record. Ideally the xf_thread record needs to be locked and the actual database value pushed into the...

Read more

Continue reading...
 
Status
Not open for further replies.
Top