Ticket #10905 (closed defect: duplicate)

Opened 3 years ago

Last modified 22 months ago

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
Action Needed: code Verified: no
Deployments affected: Blocked By:
Blocking:

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

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

Change History

Changed 3 years ago by erikos

Copied file was here 15.png

  Changed 3 years ago by erikos

  • keywords blocker? added

follow-up: ↓ 3   Changed 3 years ago by erikos

  • next_action 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.

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...

  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...

  Changed 3 years ago by erikos

  • keywords blocker? removed

  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?

  Changed 22 months ago by erikos

  • status changed from new to closed
  • resolution set to duplicate

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

Note: See TracTickets for help on using tickets.