Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • M medialibrary
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VideoLAN
  • medialibrary
  • Merge requests
  • !594

Fix tables recreation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Hugo Beauzée-Luyssen requested to merge chouquette/medialibrary:fix_table_recreation into master Jan 25, 2022
  • Overview 0
  • Commits 8
  • Pipelines 8
  • Changes 10

The previous code was broken in multiple ways. Mostly:

  • Per-thread connections weren't flushed after deleting the tables, which could result in database is locked errors
  • Background jobs were asked to pause, but we didn't wait for the pause to be effective, which was likely to cause the background jobs to access some removed tables.

Since this requires locking when accessing the idle states, refactoring the external VLC instance was necessary in order to drop some locks when replacing the instance (not doing so would systematically lead to a deadlock when stopping the background jobs as the lock was held in setExternalLibvlcInstance while stopping the discoverer, and the discoverer would attempt to lock the same mutex to toggle its idle state)

Fix #405 (closed)

This will need to be backported

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix_table_recreation

VideoLAN code repository instance