~ahasenack/landscape-client/landscape-client-11.02-0ubuntu0.9.10.0

« back to all changes in this revision

Viewing changes to landscape/package/reporter.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2009-08-26 15:16:59 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090826151659-0m03i8uvnkv8ffb6
Tags: 1.3.2.3-0ubuntu0.9.10.0
* New upstream release:
  - Don't clear the hash_id_requests table upon resynchronize (LP #417122)

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
        self._store.clear_available()
202
202
        self._store.clear_available_upgrades()
203
203
        self._store.clear_installed()
204
 
        self._store.clear_hash_id_requests()
 
204
 
 
205
        # Don't clear the hash_id_requests table because the messages
 
206
        # associated with the existing requests might still have to be
 
207
        # delivered, and if we clear the table and later create a new request,
 
208
        # that new request could get the same id of one of the deleted ones,
 
209
        # and when the pending message eventually gets delivered the reporter
 
210
        # would think that the message is associated to the newly created
 
211
        # request, as it have the same id has the deleted request the message
 
212
        # actually refers to. This would cause the ids in the message to be
 
213
        # possibly mapped to the wrong hashes.
 
214
        #
 
215
        # This problem would happen for example when switching the client from
 
216
        # one Landscape server to another, because the uuid-changed event would
 
217
        # cause a resynchronize task to be created by the monitor. See #417122.
 
218
        #
 
219
        #self._store.clear_hash_id_requests()
 
220
 
205
221
        return succeed(None)
206
222
 
207
223
    def _handle_unknown_packages(self, hashes):