Skip to content

Commit

Permalink
Fixed CORE-5640: New connections to database are slow when multiple c…
Browse files Browse the repository at this point in the history
…onnects happen at the same moment
  • Loading branch information
AlexPeshkoff committed Oct 17, 2017
1 parent fbb905b commit 6185952
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jrd/jrd.cpp
Expand Up @@ -1024,7 +1024,9 @@ ISC_STATUS GDS_ATTACH_DATABASE(ISC_STATUS* user_status,

DatabaseContextHolder dbbHolder(tdbb);

#ifdef SUPERSERVER
if (!(dbb->dbb_flags & DBB_new))
#endif
{
// That's already initialized DBB
// No need keeping dbInitMutex locked any more
Expand Down Expand Up @@ -1143,7 +1145,9 @@ ISC_STATUS GDS_ATTACH_DATABASE(ISC_STATUS* user_status,

// Init complete - we can release dbInitMutex
dbb->dbb_flags &= ~DBB_new;
#ifdef SUPERSERVER
guardDbInit.leave();
#endif
}
else
{
Expand Down

0 comments on commit 6185952

Please sign in to comment.