Skip to content
Snippets Groups Projects

Prevent multiple nodes fopen-ing the same file

Merged Sal requested to merge no-multi-fopen into master

Should fix a server crash with the legacy downloader when multiple players try to receive the same file simultaneously.

Also displays the strerror output when this error occurs.

Edited by Sal

Merge request reports

Merged by SalSal 2 years ago (Dec 20, 2022 10:06am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • "Works" in the sense that the message appears when I force the file not to exist. Screenshot_20221219_141336

    The current problem with this branch right now is that now if two players are downloading the same file, one is forced to wait, but once a player is done finishing downloading that file, the waiting player doesn't "resume" downloading, it just gets stuck, which should be fixed. Screenshot_20221219_142750 Screenshot_20221219_142855

    I think this branch could just be the error message to start with, because as far as I personally tested there's no problems when two players download the same file through the internal downloader. Once we see actual error messages pop out I believe a better solution can be found. Rescinding this part of the comment because opening the same file multiple times does lead into implementation-defined behaviour which is dangerous.

    Edited by JugadorXEI
  • Sal added 1 commit

    added 1 commit

    • 533dc7d6 - Use strerror when file transfer can't be opened

    Compare with previous version

  • Sal marked this merge request as draft

    marked this merge request as draft

  • Sal added 1 commit

    added 1 commit

    • cc54d98a - New system to prevent multiple fopen

    Compare with previous version

  • Sal added 1 commit

    added 1 commit

    Compare with previous version

  • Sal marked this merge request as ready

    marked this merge request as ready

  • merged

  • Sal mentioned in commit e8dee823

    mentioned in commit e8dee823

Please register or sign in to reply
Loading