Skip to content

Commit

Permalink
Create MonitoringData early to avoid races later.
Browse files Browse the repository at this point in the history
It fixed leakage of MonitoringData instance (and few related handles) when many connections created simultaneously.
See also CORE-5702.
  • Loading branch information
hvlad committed Apr 12, 2018
1 parent da0bde9 commit ad0580e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/jrd/jrd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1604,6 +1604,7 @@ JAttachment* JProvider::internalAttach(CheckStatusWrapper* user_status, const ch
dbb, Ods::hdr_nbak_unknown);
dbb->dbb_backup_manager->initializeAlloc(tdbb);
dbb->dbb_crypto_manager = FB_NEW_POOL(*dbb->dbb_permanent) CryptoManager(tdbb);
dbb->dbb_monitoring_data = FB_NEW_POOL(*dbb->dbb_permanent) MonitoringData(dbb);

PAG_init2(tdbb, 0);
PAG_header(tdbb, false);
Expand Down

0 comments on commit ad0580e

Please sign in to comment.