Opened 4 years ago

Closed 2 years ago

#10905 closed defect (duplicate)

Copy item from external device to Journal: misorder

Reported by: erikos Owned by: erikos
Priority: high Milestone: 11.3.0
Component: sugar Version: Development build as of this date
Keywords: Cc: sascha_silbe
Blocked By: Blocking:
Deployments affected: Action Needed: code
Verified: no

Description

Steps to reproduce:

  • copy an item from an external device in the Journal (drag an item in the external device view onto the Journal icon, from the detail view of the item)

---> most of the time the item shows up at the bottom of the list

I would suggest this to be a blocker bug.

Attachments (1)

Screenshot of _Journal_.png (64.5 KB) - added by erikos 4 years ago.
Copied file was here 15.png

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by erikos

Copied file was here 15.png

comment:1 Changed 3 years ago by erikos

  • Keywords blocker? added

comment:2 follow-up: Changed 3 years ago by erikos

  • Action Needed changed from diagnose to code

What is happening is that when we create the new entry the ListView does recognize that and refreshes the view. As we are currently showing the view of the external device this one is refreshed. When we switch now to the Journal view this has not been refreshed and therefore the new item does not appear at the top.

comment:3 in reply to: ↑ 2 Changed 3 years ago by erikos

Replying to erikos:

What is happening is that when we create the new entry the ListView does recognize that and refreshes the view. As we are currently showing the view of the external device this one is refreshed. When we switch now to the Journal view this has not been refreshed and therefore the new item does not appear at the top.

Must have read it wrongly. We do call refresh when we select the Journal 'volume'. Hmmm...

comment:4 Changed 3 years ago by erikos

Update: the trace of this bug is hinting to the ds.

When we switch from the 'external-device-view' to the Journal view the datastore is requested for a new set of items. The returned list has the new item at the end.

Another hint which is distinctive to this bug is that if you wait a few seconds after you copied the file and switch then to the Journal view the copied item has the right position. This is because after 5 seconds we flush the index. We do call flush index after we have created the new ds entry but we do not force it. If you set here 'force' to 'true' we flush the index and have the desired result.

I compared the code with the 0.84 one, where this is working, but we do not force the flush there neither. So I am looking now at other changes that might have caused it. [This one http://git.sugarlabs.org/sugar-datastore/mainline/commit/3644facf0a296c7d55b44394942b866529361248] looks like touching this area...


comment:5 Changed 3 years ago by erikos

  • Keywords blocker? removed

comment:6 Changed 3 years ago by sascha_silbe

  • Cc sascha_silbe added

Are you sure this is a bug in the data store rather than Xapian? Can you try running sugar-datastore 0.84 on the same system, please?

comment:7 Changed 2 years ago by erikos

  • Resolution set to duplicate
  • Status changed from new to closed

Opened http://bugs.sugarlabs.org/ticket/4306 to better track this upstream and closing this one.

Note: See TracTickets for help on using tickets.