Project

General

Profile

Bug #2417

DatabaseManager reports severe error when registering a database more than once

Added by Eric Faulhaber over 9 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

History

#1 Updated by Eric Faulhaber over 9 years ago

The following code in DatabaseManager.registerDatabase(DatabaseConfig, Database, boolean) may not be correct:

// Determine global reference count for this database.
Integer refCountObj = transientDatabases.get(database);
int refCount = (refCountObj != null) ? refCountObj : 0;

if (schemaByDatabase.get(database) != null)
{
   log.log(Level.SEVERE, "Database " + database + " was already registered.");
   refCount = -1;
}

I don't remember why we set the refCount to -1 when we find database in the schemaByDatabase map. This logic results in a lot of SEVERE error messages in the server log, probably as the result of connecting to the same transient database more than once. This logic needs to be analyzed and corrected if it's wrong, or if it's determined to be correct, the log level needs to be toned down from SEVERE to FINE.

Also available in: Atom PDF