I don't know what you mean here - we only have functionality to update a
single object at a time.  I can collect all of the comment ids together,
then increment them all,  but I don't see the advantage.


On Sun, Aug 18, 2013 at 10:27 PM, keyist <notifications@github.com> wrote:

> In r2/r2/models/link.py:
>
> > @@ -1038,6 +1053,11 @@ def reply_costs_karma(self):
> >              return True
> >          return self.try_parent(lambda p: p.reply_costs_karma, False)
> >
> > +    def incr_descendant_karma(self, amount):
> > +        self._incr('_descendant_karma', amount)
> > +        if hasattr(self, 'parent_id') and self.parent_id:
> > +            Comment._byID(self.parent_id).incr_descendant_karma(amount)
> > +
>
> This can be done in a single UPDATE -- get all the ids of comments that
> need to be updated (i.e. self and all the ancestors of self), and scope the
> query to increment descendant karma for just those ids.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/tricycle/lesswrong/pull/85/files#r5834931>
> .
>



-- 
"*And someday when the descendants of humanity have spread from star to
star, they won't tell the children about the history of Ancient Earth until
they're old enough to bear it; and when they learn they'll weep to hear
that such a thing as Death had ever once existed!*"

-Eliezer Yudkowsky

"Trust me" means "I love you" <http://project-apollo.net/mos/mos114.html>

"This isn't even my final form!"

-Tim Hausler