ZeitgeistListener tracebacks on SV_FILE_DELETED

Bug #692730 reported by Guillermo Gonzalez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Fix Released
High
Alejandro J. Cura

Bug Description

Looks like ZeitgeistListener.handle_SV_FILE_DELETED depends on having the node metadata for procesing the event...but it's not there as it was deleted...in other words I think it depends on the order the event handlers are called.

I think that one solution is to use different event that carry all the information required by ZeitgeistListener to log the file deletion.

Logs:

2010-12-20 17:31:08,514 - ubuntuone.SyncDaemon.sync - INFO - handle_AQ_DELTA_OK for volume 555043d6-068b-4edb-9cbb-93e2007daff2. (2 items)
2010-12-20 17:31:08,516 - ubuntuone.SyncDaemon.sync - DEBUG - T:NONE:F 0f7384a2-2962-4b95-838d-f7515275cba2 ['555043d6-068b-4edb-9cbb-93e2007daff2'::'b809fe1b-4873-429d-9365-60168fb26891'] ''CP to U1 from Cristian Parrino/Online Services - QBR October 2010rev.odp'' | EVENT: SV_HASH_NEW:{'hash_eq_local_hash': 'T', 'hash_eq_server_hash': 'T'} with ARGS:('sha1:0a569086b6b1ea5fab3744e163793ef0f4f6a44e',)
2010-12-20 17:31:08,517 - ubuntuone.SyncDaemon.sync - INFO - T:NONE:F 0f7384a2-2962-4b95-838d-f7515275cba2 ['555043d6-068b-4edb-9cbb-93e2007daff2'::'b809fe1b-4873-429d-9365-60168fb26891'] ''CP to U1 from Cristian Parrino/Online Services - QBR October 2010rev.odp'' | Calling nothing (got SV_HASH_NEW:{'hash_eq_local_hash': 'T', 'hash_eq_server_hash': 'T'})
2010-12-20 17:31:08,518 - ubuntuone.SyncDaemon.sync - DEBUG - T:NONE:F 0f7384a2-2962-4b95-838d-f7515275cba2 ['555043d6-068b-4edb-9cbb-93e2007daff2'::'b809fe1b-4873-429d-9365-60168fb26891'] ''CP to U1 from Cristian Parrino/Online Services - QBR October 2010rev.odp'' | Called nothing
2010-12-20 17:31:08,518 - ubuntuone.SyncDaemon.fsm - DEBUG - set mdid='0f7384a2-2962-4b95-838d-f7515275cba2': {'generation': 2062L}
2010-12-20 17:31:08,519 - ubuntuone.SyncDaemon.sync - DEBUG - -:-:- - ['555043d6-068b-4edb-9cbb-93e2007daff2'::'761b877f-bcf1-4654-ae85-f9902c2a6f53'] ''-'' | EVENT: SV_FILE_DELETED:{} with ARGS:()
2010-12-20 17:31:08,519 - ubuntuone.SyncDaemon.sync - INFO - -:-:- - ['555043d6-068b-4edb-9cbb-93e2007daff2'::'761b877f-bcf1-4654-ae85-f9902c2a6f53'] ''-'' | Calling nothing (got SV_FILE_DELETED:{})
2010-12-20 17:31:08,520 - ubuntuone.SyncDaemon.sync - DEBUG - -:-:- - ['555043d6-068b-4edb-9cbb-93e2007daff2'::'761b877f-bcf1-4654-ae85-f9902c2a6f53'] ''-'' | Called nothing
2010-12-20 17:31:08,520 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SV_FILE_DELETED, args:(), kw:{'is_dir': False, 'node_id': '761b877f-bcf1-4654-ae85-f9902c2a6f53', 'volume_id': '555043d6-068b-4edb-9cbb-93e2007daff2'}
2010-12-20 17:31:08,520 - ubuntuone.SyncDaemon.VM - DEBUG - update_generation: '555043d6-068b-4edb-9cbb-93e2007daff2', 2070L
2010-12-20 17:31:08,521 - ubuntuone.SyncDaemon.ActionQueue - DEBUG - GetDelta share:'555043d6-068b-4edb-9cbb-93e2007daff2' node:None GetDelta(generation='2070L') queueing in the META_QUEUE
2010-12-20 17:31:08,521 - ubuntuone.SyncDaemon.sync - INFO - handle_AQ_DELTA_OK for volume '555043d6-068b-4edb-9cbb-93e2007daff2' done at generation 2070. (1 deletes)
2010-12-20 17:31:08,522 - ubuntuone.SyncDaemon.EQ - ERROR - Error encountered while handling: SV_FILE_DELETED in <ubuntuone.syncdaemon.event_logging.ZeitgeistListener object at 0x9188fac>
Traceback (most recent call last):
  File "/home/guillermo/canonical/ubuntuone-client/a-tritcask-for-vm/ubuntuone/syncdaemon/event_queue.py", line 305, in _dispatch
    method(*args, **kwargs)
  File "/home/guillermo/canonical/ubuntuone-client/a-tritcask-for-vm/ubuntuone/syncdaemon/event_logging.py", line 376, in handle_SV_FILE_DELETED
    mdo = self.fsm.get_by_node_id(volume_id, node_id)
  File "/home/guillermo/canonical/ubuntuone-client/a-tritcask-for-vm/ubuntuone/syncdaemon/filesystem_manager.py", line 751, in get_by_node_id
    mdid = self._idx_node_id[(share_id, node_id)]
  File "/home/guillermo/canonical/ubuntuone-client/a-tritcask-for-vm/ubuntuone/syncdaemon/filesystem_manager.py", line 180, in __getitem__
    return dict.__getitem__(self, key)
KeyError: ('555043d6-068b-4edb-9cbb-93e2007daff2', '761b877f-bcf1-4654-ae85-f9902c2a6f53')

Tags: u1-ziggy

Related branches

Changed in ubuntuone-client:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Alejandro J. Cura (alecu)
tags: added: u1-ziggy
Changed in ubuntuone-client:
status: Confirmed → In Progress
Changed in ubuntuone-client:
status: In Progress → Fix Committed
dobey (dobey)
Changed in ubuntuone-client:
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.