Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 501
    • Issues 501
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 52
    • Merge requests 52
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • KeaKea
  • Issues
  • #1227
Closed
Open
Created May 11, 2020 by Razvan Becheriu@razvanDeveloper

refactor HooksManager and remove conditionallyInitialize to handle functions without locks in MT

the only reason conditionallyInitialize exists is because when loadingLibraries is failing, the lm_collaction_ is reset to null, or if loadLibraries is not called, to be able to call related functions.

In the state when lm_collection_ is null , any function needing it will create a dummy one by calling conditionallyInitialize.

If we initialize lm_collection_ on constructor (with a dummy just like conditionallyInitialize does), and also initialize when loadLibraries fails, we can completely remove conditionallyInitialize.

This is important because it is not safe to use conditionallyInitialize from hooks points without locking, so we can completely avoid this by explicitly initializing lm_collection_ and never have to handle the null case.

needed by #1137

Edited May 13, 2020 by Razvan Becheriu
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking