Comment timestamps causing invalid ordering on post

Bug #837699 reported by Robert Marianski
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL3
Fix Released
Medium
Chris Rossi

Bug Description

Comments on blog posts look like they are sort in time ascending order. But on this post:
https://karl.soros.org/communities/karl-core-team/blog/planning-for-this-week-and-beyond/

it looks like the comments are not in the order that they were created. It appears to be sorted based on timestamp, but the timestamps themselves are not correct. The correct comment order should be Robert, Paul, Jim, Nat.

Tags: r3.72
Changed in karl3:
importance: Undecided → Medium
milestone: none → m72
Revision history for this message
Nat Katin-Borland (nborland) wrote : RE: [Bug 837699] [NEW] comment timestamps causing invalid ordering on post

In a related issue, it actually looks like the timestamp for original blog post is off as well...

--
Nathaniel Katin-Borland
Support Specialist
Knowledge Management Initiative
KARL Support Team

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Launchpad Bug Tracker
Sent: Tuesday, August 30, 2011 5:36 PM
To: Nathaniel Katin-Borland
Subject: [Bug 837699] [NEW] comment timestamps causing invalid ordering on post

You have been subscribed to a public bug by Robert Marianski (rmarianski):

Comments on blog posts look like they are sort in time ascending order. But on this post:
https://karl.soros.org/communities/karl-core-team/blog/planning-for-this-week-and-beyond/

it looks like the comments are not in the order that they were created.
It appears to be sorted based on timestamp, but the timestamps themselves are not correct. The correct comment order should be Robert, Paul, Jim, Nat.

** Affects: karl3
     Importance: Medium
         Status: New

--
comment timestamps causing invalid ordering on post
https://bugs.launchpad.net/bugs/837699
You received this bug notification because you are subscribed to the bug report.

Revision history for this message
Shane Hathaway (shane-hathawaymix) wrote :

It appears that at least some of the comments were submitted by email and that the code in karl that parses email dates was a bit broken. I believe I have fixed it on my branch:

https://github.com/hathawsh/karl/commit/d1f23226d7d08f2c62142cf77942d7e567e881de

Changed in karl3:
status: New → Fix Committed
Revision history for this message
Shane Hathaway (shane-hathawaymix) wrote :

BTW, Karl currently trusts the email client to provide the correct date and time. That might not be a good idea, since users' clocks could easily be wrong or misconfigured. I wonder if it would be better to just ignore the date provided by the email client.

Revision history for this message
Paul Everitt (paul-agendaless) wrote : Re: [Bug 837699] comment timestamps causing invalid ordering on post

Go ahead and merge this to the trunk. I think (cc-ing Chris) we don't stage these small bugs separately.

--Paul

On Aug 31, 2011, at 6:02 AM, Shane Hathaway wrote:

> It appears that at least some of the comments were submitted by email
> and that the code in karl that parses email dates was a bit broken. I
> believe I have fixed it on my branch:
>
> https://github.com/hathawsh/karl/commit/d1f23226d7d08f2c62142cf77942d7e567e881de
>
>
> ** Changed in: karl3
> Status: New => Fix Committed
>
> --
> You received this bug notification because you are subscribed to KARL3.
> https://bugs.launchpad.net/bugs/837699
>
> Title:
> comment timestamps causing invalid ordering on post
>
> Status in KARL3:
> Fix Committed
>
> Bug description:
> Comments on blog posts look like they are sort in time ascending order. But on this post:
> https://karl.soros.org/communities/karl-core-team/blog/planning-for-this-week-and-beyond/
>
> it looks like the comments are not in the order that they were
> created. It appears to be sorted based on timestamp, but the
> timestamps themselves are not correct. The correct comment order
> should be Robert, Paul, Jim, Nat.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/karl3/+bug/837699/+subscriptions

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Nat, assigning to you for a policy decision on comment #3 from Shane. I think he is right, we should base the time on when it arrives at KARL.

Changed in karl3:
assignee: nobody → Nat Katin-Borland (nborland)
status: Fix Committed → In Progress
Revision history for this message
Robert Marianski (rmarianski) wrote :

The reasoning behind using the timestamp from the email is that when the mail queue gets jammed up, all the messages flood through at the same time. This has happened a couple of times, and comments all show up out of order on blog posts. But maybe this is the lesser of 2 evils.

Just brainstorming, what do you think of using the timestamp on the file delivered to the mailbox? Or does that have its own set of problems/inconsistencies as the messages are moved around between queues?

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Handing back to Shane. I think you're right, we can look at the headers for dates on the intermediate Postfix servers at gocept, as long as repoze.postfix gives us access to that.

Changed in karl3:
assignee: Nat Katin-Borland (nborland) → Shane Hathaway (shane-hathawaymix)
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Moving this back to M71 (this week). I suspect this is one of the easier ones for Shane to work on and close while we still have him this week.

Changed in karl3:
milestone: m72 → m71
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Shane, can you close this one out this week? (Note the comment history for the decision.)

summary: - comment timestamps causing invalid ordering on post
+ Comment timestamps causing invalid ordering on post
Changed in karl3:
milestone: m71 → m72
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Shane, any luck on this one?

Changed in karl3:
milestone: m72 → m73
Revision history for this message
Shane Hathaway (shane-hathawaymix) wrote :

I did fix the time parsing logic so that ordering should be maintained if everyone's clock is correct (see comment #2), but I have not yet tried to use headers from repoze.postfix. I will look into it.

Changed in karl3:
milestone: m73 → m74
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Shane, on Sep 12 you said you were looking into it. Plan to get it done in time for this week's Thursday release, or do I reschedule it?

Revision history for this message
Shane Hathaway (shane-hathawaymix) wrote : Re: [Bug 837699] Re: Comment timestamps causing invalid ordering on post

On 09/20/2011 09:11 AM, Paul Everitt wrote:
> Shane, on Sep 12 you said you were looking into it. Plan to get it done
> in time for this week's Thursday release, or do I reschedule it?

Yes, I plan to work on it tonight.

Shane

Revision history for this message
Shane Hathaway (shane-hathawaymix) wrote :

Karl will now look for a new delivery date header provided by repoze.postoffice 0.17+. To complete this bugfix, one of the Chris's needs to release 0.17 to the Karl index (and probably to PyPI as well).

Changed in karl3:
assignee: Shane Hathaway (shane-hathawaymix) → nobody
assignee: nobody → Shane Hathaway (shane-hathawaymix)
assignee: Shane Hathaway (shane-hathawaymix) → Chris Rossi (chris-archimedeanco)
Changed in karl3:
milestone: m74 → m75
Changed in karl3:
status: In Progress → Fix Committed
JimPGlenn (jpglenn09)
tags: added: r3.72
Revision history for this message
JimPGlenn (jpglenn09) wrote :

fixed

Changed in karl3:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.