Bug 31228 - Speedup update of application
Speedup update of application
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 3.1
Other Linux
: P5 enhancement (vote)
: UCS 3.2
Assigned To: Dirk Wiesenthal
Erik Damrose
: interim-2
Depends on:
Blocks: 32398
  Show dependency treegraph
 
Reported: 2013-04-29 14:18 CEST by Dirk Wiesenthal
Modified: 2013-11-19 06:42 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2013-04-29 14:18:52 CEST
Currently, when updating an application, the old component is first removed and then the new component is added. This commits /etc/apt/sources.list.d/20_ucs-online-component.list and /etc/apt/sources.list.d/15_ucs-online-version.list twice and it takes a considerable amount of time.

One may speedup the process by removing and adding the component at the same time.

Draft for ComponentManager.remove_app():
def remove_app(self, app, super_ucr=None):
  if super_ucr is None:
    with set_save_commit_load(self.ucr) as super_ucr:
      return self.remove_app(app, super_ucr)
  self._remove(app.component_id, super_ucr)
  # same for add_app

Draft for Application.install():
[...]
with set_save_commit_load(ucr) as super_ucr:
  component_manager.remove_app(old_app, super_ucr)
  component_manager.put_app(self, super_ucr)
# here it gets commited
[...]
Comment 1 Dirk Wiesenthal univentionstaff 2013-07-16 13:51:02 CEST
Fixed in
  univention-management-console-module-appcenter (3.0.3-1)
Comment 2 Erik Damrose univentionstaff 2013-08-23 15:00:43 CEST
Code was introduced in r42137 and first build in univention-management-console-module-appcenter (3.0.4-1).
Debian changelog file was updated afterwards (r42442) and incorrectly claims this bugfix to be present since 3.0.3-1.
Comment 3 Erik Damrose univentionstaff 2013-08-23 16:28:37 CEST
FAIL: during the update process the new repository is added to the sources.list, so both are present. The operation is not atomic, as this bugfix initially promised. REOPEN for further investigation.
Comment 4 Dirk Wiesenthal univentionstaff 2013-08-28 12:12:18 CEST
Yes, speedup was observable only under certain (mostly synthetic) conditions.

Updated the code to really commit UCR only once during updates. Code for (un)registering an app in UCR had to be rewritten and the patch got more complex than Comment 0 promised - but now it is more reliable (because the logic is in one place and not in every function that wants to register something) and was needed for Bug#32308 anyway.

Fixed in
  univention-management-console-module-appcenter 3.0.20-1.172.201308281205
Comment 5 Erik Damrose univentionstaff 2013-08-30 11:36:44 CEST
Removing and adding components during updates is now done in atomic steps: OK

-> Verified
Comment 6 Stefan Gohmann univentionstaff 2013-11-19 06:42:17 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".