[Fix] NextUp Updates Require Restart #1280
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Fixes #1279.
When I made this change: #1258 (comment), I updated the maxNextUp and resumeNextUp settings to use let constants. However, this introduced an issue where you cannot update the values for maxNextUp or resumeNextUp without restarting Swiftfin. Changing them to var doesn’t fully resolve the problem either, as the values still don’t update dynamically.
PR Fix
If I revert the change from #1258 (comment), the issue is resolved.
Alternative Fix
I also explored another approach that allows these values to update dynamically without requiring a restart. The fix uses
Published
properties in combination with Defaults.publisher to observe changes and update the values in real-time.Let me know if we want to go the alternative route or if there is a better solution I haven't explored yet! For this PR, I chose to start with the 4 line change vs the 20 line change.