Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4306 closed defect (fixed)

Creating a new Journal entry can have the wrong order

Reported by: erikos Owned by: erikos
Priority: Normal Milestone:
Component: Sugar Version: 0.98.x
Severity: Major Keywords: olpc-test-pending, r?
Cc: Distribution/OS: OLPC
Bug Status: Assigned

Description

See http://dev.laptop.org/ticket/10905 which deals with the case where we are hitting the issue when "Copying an item from external device to Journal" and #4305 where we have seen this issue when we create a screenshot in the Home View.

Attachments (2)

flush_index.patch (720 bytes) - added by erikos 8 years ago.
This patch does force to flush the index, otherwise we do have the 5 seconds timeout
0001-Flush-the-index-before-send-created-signal-SL-4306.patch (1.0 KB) - added by godiard 8 years ago.
Another alternative solution

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by erikos

Please see http://dev.laptop.org/ticket/10905 for a first diagnosis of this issue.

Changed 8 years ago by erikos

This patch does force to flush the index, otherwise we do have the 5 seconds timeout

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

Test:

  • on the Home View, take a screen-shot
  • switch directly to the Journal

---> the new item is at the bottom

  • on the Home View, take a screen-shot, wait there a few seconds
  • switch to the Journal

---> the new item is at the top, correctly ordered

The patch above does make both cases work correctly.

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

Replying to erikos:

Test:

  • on the Home View, take a screen-shot
  • switch directly to the Journal

---> the new item is at the bottom

  • on the Home View, take a screen-shot, wait there a few seconds
  • switch to the Journal

---> the new item is at the top, correctly ordered

The patch above does make both cases work correctly.

Great Simon, the testcase passes with the patch applied for me, in sugar-build and in the XO.

comment:4 Changed 8 years ago by manuq

I confirm #4305, entries made by doing screenshots, passes too.

Today I have seen this bug in 12.1.0, so it is with us at least since then.

comment:5 Changed 8 years ago by erikos

  • Keywords olpc-test-pending added
  • Resolution set to fixed
  • Status changed from new to closed

Pushed as datastore: 56171a8e46d53d41ee5f056a9155975917ebc379 after some more testing.

Changed 8 years ago by godiard

Another alternative solution

comment:6 Changed 8 years ago by godiard

  • Keywords r? added

Attached a different solution proposal.

After check the sequence of events, I found than at times,
the Created dbus signal before the index was flushed.

This patch check if the index is updated, and if not, flush it
immediatly before the signal is emited.

comment:7 Changed 8 years ago by dnarvaez

  • Milestone 0.98 deleted

Milestone 0.98 deleted

Note: See TracTickets for help on using tickets.