Page MenuHomePhorge

user:resync: efficient resync for created/deleted users
ClosedPublic

Authored by mollekopf on Tue, Nov 26, 2:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 8, 9:42 AM
Unknown Object (File)
Sun, Dec 8, 1:11 AM
Unknown Object (File)
Sat, Dec 7, 8:35 AM
Unknown Object (File)
Sat, Dec 7, 3:09 AM
Unknown Object (File)
Fri, Dec 6, 11:15 PM
Unknown Object (File)
Fri, Dec 6, 8:50 PM
Unknown Object (File)
Fri, Dec 6, 5:41 PM
Unknown Object (File)
Fri, Dec 6, 1:39 PM
Subscribers

Details

Reviewers
machniak
Group Reviewers
Restricted Project
Commits
rK845b6cd1fa0e: user:resync: efficient resync for created/deleted users
Summary

Instead of going over all users, we query for incomplete
creations/deletions separately to only retrieve users that actually
require a resync.

The resync job is only triggered when requesting an individual user,
and from the db status everything already seems in order.

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Tue, Nov 26, 2:06 PM
machniak subscribed.
machniak added inline comments.
src/app/Console/Commands/User/ResyncCommand.php
89

Here and above we should make use of $with_ldap variable, to make it working as expected on a normal Kolab4 installation not only at KolabNow.

This revision now requires changes to proceed.Tue, Nov 26, 2:10 PM
mollekopf retitled this revision from user:resync --created-only to user:resync: efficient resync for created/deleted users.
mollekopf edited the summary of this revision. (Show Details)

Rewrote resync to use separate queries for created/deleted

Passes all tests, the only functional difference is that if invoked with a single user account we always at least trigger the resyncjob (before the account could be detected as in sync).

Really only test the IMAP_READY status

machniak added inline comments.
src/app/Console/Commands/User/ResyncCommand.php
186

This job is not intended for deleted users. So, we need some sanity check here. And the test will need an adjustment.

This revision now requires changes to proceed.Wed, Nov 27, 9:09 AM
mollekopf marked an inline comment as done.

Avoid pushing resync jobs for deleted users

mollekopf added inline comments.
src/app/Console/Commands/User/ResyncCommand.php
186

ok, that now also removes the functional change that we had in the test.

This revision is now accepted and ready to land.Wed, Nov 27, 10:12 AM