mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
Sometimes World.save() did not save the whole world. (#1538)
flag = true is a force save of the whole world (for example World.save()), this should ignore the current queue size.
This commit is contained in:
parent
2011e076be
commit
3ef552d105
@ -8,7 +8,7 @@ Adds a command line flag to enable stats on how chunk saves are processing.
|
||||
Stats on current queue, how many was processed and how many were queued.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 5197062293..e4d2a3a0b5 100644
|
||||
index 09c81e9ab..a94719d58 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
@ -50,11 +50,11 @@ index 5197062293..e4d2a3a0b5 100644
|
||||
+ );
|
||||
+ }
|
||||
+ }
|
||||
if (queueSize > world.paperConfig.queueSizeAutoSaveThreshold){
|
||||
if (!flag && queueSize > world.paperConfig.queueSizeAutoSaveThreshold){
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index e86d47a05e..ec328126cf 100644
|
||||
index e86d47a05..ec328126c 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
|
@ -7,7 +7,7 @@ If the save queue already has 50 (configurable) of chunks pending,
|
||||
then avoid processing auto save (which would add more)
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 0d456bcbac..40746c13ef 100644
|
||||
index 0d456bcba..40746c13e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
@ -23,7 +23,7 @@ index 0d456bcbac..40746c13ef 100644
|
||||
private void removeCorruptTEs() {
|
||||
removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false);
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 69219b13a6..5197062293 100644
|
||||
index 69219b13a..09c81e9ab 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
@ -33,7 +33,7 @@ index 69219b13a6..5197062293 100644
|
||||
+ // Paper start
|
||||
+ final ChunkRegionLoader chunkLoader = (ChunkRegionLoader) world.getChunkProviderServer().chunkLoader;
|
||||
+ final int queueSize = chunkLoader.getQueueSize();
|
||||
+ if (queueSize > world.paperConfig.queueSizeAutoSaveThreshold){
|
||||
+ if (!flag && queueSize > world.paperConfig.queueSizeAutoSaveThreshold){
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Paper end
|
||||
@ -41,7 +41,7 @@ index 69219b13a6..5197062293 100644
|
||||
Chunk chunk = (Chunk) objectiterator.next();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 695044b1b1..e86d47a05e 100644
|
||||
index 695044b1b..e86d47a05 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
|
Loading…
Reference in New Issue
Block a user