Skip to content

Conversation

@DeepDiver1975
Copy link
Member

…ished

refs #25480

@mention-bot
Copy link

@DeepDiver1975, thanks for your PR! By analyzing the annotation information on this pull request, we identified @icewind1991, @mmattel and @bartv2 to be potential reviewers

@DeepDiver1975 DeepDiver1975 added this to the 9.2 milestone Aug 18, 2016
}
while (!$connection->isConnected()) {
try {
$connection->connect();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a max retries count to avoid infinite loops

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in which case the exception is rethrown to the outside

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave this to the admin then to decide if/when he wants to terminate the scan

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, in my mind I saw this method as part of DBConnection but it isn't. Since this loop is only in the context of file scanning then it's fine.

@DeepDiver1975 DeepDiver1975 changed the title Before a user is getting scanned the database connection is re-establ… [9.2] Before a user is getting scanned the database connection is re-establ… Aug 18, 2016
@georgehrke
Copy link
Contributor

👍

@PVince81
Copy link
Contributor

@DeepDiver1975 any chance to have a little unit test that covers the reconnection part, so that CI can tell us that all databases are ok with it ?

@DeepDiver1975
Copy link
Member Author

so that CI can tell us that all databases are ok with it ?

there is not much dbms specific in here - doctrine unsets the connection on close and creates a new connection within connect.

@PVince81
Copy link
Contributor

Another concern of mine is whether reconnecting a thousand times is slower than keeping the connection open. If slower, a possible strategy would be to keep track of elapsed time and after every user check if the time is more than a minute or so. If yes, then reconnecting.

But if you think the overhead is negligible then I'm fine with this.

@PVince81
Copy link
Contributor

@DeepDiver1975 can you check my previous comment ? Would be good to get this merged and backported soon, unless you think this is too risky

@DeepDiver1975
Copy link
Member Author

But if you think the overhead is negligible then I'm fine with this.

Form my pov this can be ignored

@PVince81
Copy link
Contributor

👍 tested with LDAP and 100 users

@PVince81
Copy link
Contributor

Jenkins unpublished success message -> merge

@PVince81 PVince81 merged commit 27a5be9 into master Aug 22, 2016
@PVince81 PVince81 deleted the files-scan-reconnect-database-before-each-user-master branch August 22, 2016 08:55
@PVince81
Copy link
Contributor

@DeepDiver1975 please send the backports, thanks

@DeepDiver1975
Copy link
Member Author

DeepDiver1975 commented Aug 22, 2016

@lock
Copy link

lock bot commented Aug 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants