From efa4155840d01c4ffbc52b377eac3d385fbe8df6 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Wed, 17 Jul 2024 07:39:30 -0700 Subject: [PATCH] Fix priority scheduling logic This resolves sync loads not being properly prioritised. --- patches/server/Moonrise-optimisation-patches.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/server/Moonrise-optimisation-patches.patch b/patches/server/Moonrise-optimisation-patches.patch index d5a5d8b3dc..a0890a6d4c 100644 --- a/patches/server/Moonrise-optimisation-patches.patch +++ b/patches/server/Moonrise-optimisation-patches.patch @@ -12165,7 +12165,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return us == null ? dfl : us; + } + if (us == null) { -+ return dfl; ++ return neighbour; + } + + return PrioritisedExecutor.Priority.max(us, neighbour); @@ -12211,7 +12211,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + // must hold scheduling lock + public void raisePriority(final PrioritisedExecutor.Priority priority) { -+ if (this.priority == null || this.priority.isHigherOrEqualPriority(priority)) { ++ if (this.priority != null && this.priority.isHigherOrEqualPriority(priority)) { + return; + } + this.setPriority(priority); @@ -12242,7 +12242,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + // must hold scheduling lock + public void lowerPriority(final PrioritisedExecutor.Priority priority) { -+ if (this.priority == null || this.priority.isLowerOrEqualPriority(priority)) { ++ if (this.priority != null && this.priority.isLowerOrEqualPriority(priority)) { + return; + } + this.setPriority(priority);