Delete user, reassign bug?

0 views
Skip to first unread message

benmillett

unread,
Feb 3, 2008, 12:33:35 AM2/3/08
to habari-dev
I tried to reassign posts by deleting a user, but it only reassigned
the last 5 posts. Is this the correct function? I wasn't sure how to
add this to the trac. I tried to see if had been submitted already,
but I might be overlooking it. Just so you know, I like the idea of
reassigning the posts.

Ben

benmillett

unread,
Feb 3, 2008, 12:47:47 AM2/3/08
to habari-dev
Okay, so it's not that hard to submit a ticket (#146). The details
like type, priority, component, milestone, and version, I'm not sure
if I put them right. Also, this was done using the nightly from
http://www.habariproject.org/dist/habari_head.zip (downloaded today, 2
Feb, 11:30pm CST).

Scott Merrill

unread,
Feb 3, 2008, 10:28:49 AM2/3/08
to habar...@googlegroups.com
On 2/3/08, benmillett <benmi...@gmail.com> wrote:
> Okay, so it's not that hard to submit a ticket (#146). The details
> like type, priority, component, milestone, and version, I'm not sure
> if I put them right. Also, this was done using the nightly from
> http://www.habariproject.org/dist/habari_head.zip (downloaded today, 2
> Feb, 11:30pm CST).

I took a quick look at this bug. There's an easy fix, as I describe
on the ticket, but worry that that easy fix won't be a viable
long-term solution.

In short, we currently reassign authors on a post-by-post basis,
meaning that if you're reassigning 50 posts, you're making 50 separate
UPDATE queries into the DB. This is inefficient at best.

Attached to ticket 146 I added a patch to include a new
Posts::reassign() method. Feedback is appreciated before I commit it.

Cheers,
Scott

Ali B.

unread,
Feb 3, 2008, 2:51:50 PM2/3/08
to habar...@googlegroups.com
Scott,

Using the IN operator with a single update stating is a good idea I believe. Above all it minimizes the number of the connections to the database by sending 1 command rather than many.
However, I am concerned if a single update statement with a 100 values for the IN operators is internally treated by the DB engine as a 100 update statements.
Reply all
Reply to author
Forward
0 new messages