Any questions left?

Especially built for company purposes – try Tine 2.0 Business Edition and get support from our team of experienced developers! No more self-debugging, but a quality-tested environment fitted to your individual requirements!

More Information

Tine 2.0 Forum

It is currently Thu Nov 26, 2015 1:19 pm

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Jan 10, 2012 1:55 pm 
User avatar

Joined: Mon Jan 09, 2012 7:36 pm
Posts: 4

I'm one of those developers cited on these post.

We do have some problems importin more than 11.000 users in a single batch, but using the cli interface of the setup (as seein in this post) resolved some (but not all) of our problems.

The problem is some untreated exceptions on the usersync backend. Since our Ldap and the application BD are not equal sometimes the import user script dies on the insert data with messages like

"String data, right truncated: 1406 Data too long for column 'tel_fax' at row 1"

and we have to start all over again and, belive me, 11000 users are not imported as fast as we hoped :lol:

I have managed to fix this (for us) changind the code in the Tinebase_User::syncUsers method by adding a second catch block to the original one and loging the problem and moving on to the next user.

(public static function syncUsers)
foreach($users as $user)
        $user = self::syncUser($user, $_syncContactData);
    } catch (Tinebase_Exception_NotFound $ten) {
        Tinebase_Core::getLogger()->crit(__METHOD__ . '::' . __LINE__ . " User {$user->accountLoginName} not synced: "
            . $ten->getMessage());
    } catch (Exception $e) {
         Tinebase_Core::getLogger()->crit(__METHOD__ . '::' . __LINE__ . " User {$user->accountLoginName} not synced: "
            . $ten->getMessage());

Since it will crash the application if this new layer of catch is not applied on our context it resolved the problem. Did you guys see another problem arising because of this implementation?

And since the same piece of code is used in the catch block, why not to just change the type of exception in the first one and get rid of the later (treat only the outermost exception)?

Thanks in advance

Cassiano Dal Pizzol

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

Jump to: