Bug 410770 - [regression] duplicate inline comments shown in compare editor
Summary: [regression] duplicate inline comments shown in compare editor
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: 2.2   Edit
Assignee: Leo Dos Santos CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on: 410673
Blocks:
  Show dependency tree
 
Reported: 2013-06-13 19:21 EDT by Sam Davis CLA
Modified: 2014-02-07 17:09 EST (History)
1 user (show)

See Also:


Attachments
screenshot (14.71 KB, image/png)
2013-06-13 19:25 EDT, Sam Davis CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2013-06-13 19:21:25 EDT
After opening the compare editor, duplicate inline comments are shown and the number of duplicates increases over time.
Comment 1 Sam Davis CLA 2013-06-13 19:25:38 EDT
Created attachment 232361 [details]
screenshot
Comment 2 Sam Davis CLA 2013-06-13 19:26:24 EDT
I have only seen this with one review so far, but it happens consistenly, although sometimes it takes a minute after opening before the duplicates start appearing. Once or twice, I saw 2 copies of a draft comment where one had my name and the other had someone else's.
Comment 3 Steffen Pingel CLA 2013-06-19 12:09:48 EDT
Is that the same as bug 410675?
Comment 4 Miles Parker CLA 2013-06-19 12:12:37 EDT
(In reply to comment #3)
> Is that the same as bug 410675?

No, it's actually happening in the popup. My guess is that it's actually similar issue to bug 410532 and may be solved by bug 410673.
Comment 5 Miles Parker CLA 2013-06-20 18:47:20 EDT
Merged: https://git.eclipse.org/r/#/c/13829/  (The user issue does indeed appear to be the culprit here.)
Comment 6 Sam Davis CLA 2013-07-16 11:26:19 EDT
I just saw this again running on 70b66a7e31cca2979b802a231be70b231a283892
Comment 7 Miles Parker CLA 2013-07-16 14:18:50 EDT
(In reply to comment #6)
> I just saw this again running on 70b66a7e31cca2979b802a231be70b231a283892

:( This can only happen if the repository user changes somehow. The regression must have been introduced by some kind of change to the way accounts are handled or initialized. I'll take a look. Did you make any configuration changes proximate to when you observed this?
Comment 8 Sam Davis CLA 2013-07-16 19:01:02 EDT
No, but it started happening again after I updated to the latest master. I have seen it 2 or 3 times since I did that.
Comment 9 Miles Parker CLA 2013-07-16 19:22:14 EDT
(In reply to comment #8)
> No, but it started happening again after I updated to the latest master. I have
> seen it 2 or 3 times since I did that.

Were these your reviews or someone else's? Were you a reviewer on those reviews initially? (I'm still not able to reproduce this.)
Comment 10 Sam Davis CLA 2013-07-22 12:55:28 EDT
I've seen it on reviews where I'm a reviewer.
Comment 11 Steffen Pingel CLA 2013-07-22 13:56:44 EDT
I saw this once recently, too. I don't recall anything particular about the review.
Comment 12 Miles Parker CLA 2013-07-29 14:32:04 EDT
I'm not really sure how to move forward on this one, frankly. I don't have any theories about why it might be happening.
Comment 13 Sam Davis CLA 2013-07-30 18:49:57 EDT
It wonder if it's caused by hovering over the glasses icon, as it seems that that sometimes increases the number of duplicates.
Comment 14 Miles Parker CLA 2013-07-30 20:01:59 EDT
(In reply to comment #13)
> It wonder if it's caused by hovering over the glasses icon, as it seems that
> that sometimes increases the number of duplicates.

Good thought. I'll try that out.
Comment 15 Sam Davis CLA 2013-08-14 16:06:52 EDT
I'm still seeing this regularly...
Comment 16 Miles Parker CLA 2013-10-07 17:39:41 EDT
I have a possible explanation here. I noticed that in some cases, the model object for a comment user is not the same model object as the Repository:Account user. We should ensure that those model objects are the same. Some UI functionality could be affected if this is not the case, such as comments not being seen as belonging to the same user as the repostiory author.
Comment 17 Miles Parker CLA 2013-10-07 17:44:30 EDT
See bug 418878
Comment 18 Miles Parker CLA 2013-10-17 16:44:06 EDT
Reassigning to default.
Comment 19 Sam Davis CLA 2013-12-20 17:16:46 EST
This is quite annoying. I would like to take a look at this for 2.2.
Comment 20 Leo Dos Santos CLA 2014-01-09 18:11:47 EST
Is this behaviour triggered in specific reviews, or is the bug workspace dependent?
Comment 21 Steffen Pingel CLA 2014-01-10 04:10:14 EST
(In reply to comment #20)
> Is this behaviour triggered in specific reviews, or is the bug workspace
> dependent?

I have seen this on various occasions in different workspaces. My suspicion is that the model update runs multiple times and adds the same comments multiple times to the model on refresh.
Comment 22 Sam Davis CLA 2014-01-10 14:00:33 EST
I don't think this is associated with specific reviews, but I have noticed that it tends to happen with multiple comments at the same time, i.e. sometimes I open a review for the first and find many of the comments get duplicated, and other times none of them do.
Comment 23 Leo Dos Santos CLA 2014-01-13 14:58:42 EST
The way to reproduce this is to open a compare editor with comments, then while the compare editor is open, refresh the review.
Comment 24 Leo Dos Santos CLA 2014-01-14 18:06:05 EST
I've submitted a changeset at https://git.eclipse.org/r/#/c/20632/. It seems that whenever a comparison editor is open, if review gets pulled (ie editor refresh) then the annotation model for the comparison editor is populated with additional comments. Ideally, the Comment would implement equality, but since I'm not familiar with EMF generated models, I added some additional equality checks to CommentAnnotation. Please review.
Comment 25 Sam Davis CLA 2014-02-07 17:09:09 EST
The fix has been merged. Thanks very much for the contribution!