Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • W wendelin.core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • wendelin.core
  • Repository

Switch branch/tag
  • wendelin.core
  • bigfile
  • _bigfile.c
Find file BlameHistoryPermalink
  • Kirill Smelkov's avatar
    bigfile/py: Garbage-collect BigFile <=> BigFileH cycles · a6a8f5ba
    Kirill Smelkov authored Nov 08, 2020
    Since ZBigFile keeps references to fileh objects that are created
    through it it forms a file <=> fileh cycle that is not collected without
    cyclic GC:
    
    https://lab.nexedi.com/nexedi/wendelin.core/blob/v0.13-52-ga702d41/bigfile/file_zodb.py#L497
    https://lab.nexedi.com/nexedi/wendelin.core/blob/v0.13-52-ga702d41/bigfile/file_zodb.py#L566-571
    
    We did not noticed this leak until now because it is small, but with
    upcoming wendelin.core 2 it is important to release a fileh, because
    there is WCFS connection associated with fileh, and if fileh is not
    released, that connection also stays alive, keeping on-WCFS resources
    still being used, and preventing WCFS from being unmounted cleanly.
    
    -> Add cyclic GC support to PyBigFile / PyBigFileH
    
    NOTE: we still don't allow PyVMA <=> PyBigFileH cycles to be collected,
    because fileh_close called from fileh.__del__ asserts that there are no
    live mappings left. See added comments for details. There is no
    known practical need to use such cycles, so this should be ok.
    
    See also other patches on cyclic GC topic:
    
    - 450ad804 (bigarray: ArrayRef support for BigArray)  // adds cyclic GC support for PyVMA
    - d97641d2 (bigfile/py: Properly untrack PyVMA from GC before dealloc)
    
    /proposed-for-review-on nexedi/wendelin.core!12
    a6a8f5ba

Replace _bigfile.c

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7