Skip to content

Commit 9144cf4

Browse files
committed
fix: ignore DistantHorizons db by default; limit backup processors
1 parent f1f683f commit 9144cf4

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
## 0.3.11
1+
## 0.3.12
22

3-
Support 1.21.5
4-
Support wildcard in ignoring patterns.
5-
It is suggested to add `*.dat_old` to the ignore minecraft backup files.
6-
Added /xb reload-config
3+
fix: ignore DistantHorizons db files default; limit backup processors

common/src/main/kotlin/com/github/zly2006/xbackup/BackupDatabaseService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class BackupDatabaseService(
230230
!shouldIgnore(it) && predicate(it.toPath())
231231
}.map { sourceFile ->
232232
@Suppress("SuspendFunctionOnCoroutineScope")
233-
this.async(Dispatchers.IO) {
233+
this.async(Dispatchers.IO.limitedParallelism(Runtime.getRuntime().availableProcessors() / 2)) {
234234
retry(5) {
235235
try {
236236
val path = root.normalize().relativize(sourceFile.toPath()).normalize()

common/src/main/kotlin/com/github/zly2006/xbackup/Config.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ class Config {
7272
"session.lock",
7373
"fake_player.gca.json",
7474
"ledger.sqlite",
75-
"**.dat_old"
75+
"**.dat_old",
76+
"DistantHorizons.sqlite",
77+
"DistantHorizons.sqlite-shm",
78+
"DistantHorizons.sqlite-wal",
7679
)
7780

7881
@SerialName("blob_path")

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ org.gradle.caching.debug=false
66
org.gradle.configureondemand=true
77

88
# Mod properties
9-
mod.version=0.3.11
9+
mod.version=0.3.12
1010
mod.group=com.github.zly2006
1111
mod.id=x-backup
1212
mod.name=X Backup

src/main/kotlin/com/github/zly2006/xbackup/XBackup.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ object XBackup : ModInitializer {
4343
private val configPath = FabricLoader.getInstance().configDir.resolve("x-backup.config.json")
4444
val log = LoggerFactory.getLogger("XBackup")!!
4545
const val MOD_VERSION = /*$ mod_version*/ "0.3.11"
46-
const val GIT_COMMIT = /*$ git_commit*/ "feab7b4"
47-
const val COMMIT_DATE = /*$ commit_date*/ "2025-04-16T13:51:49+08:00"
46+
const val GIT_COMMIT = /*$ git_commit*/ "f1f683f"
47+
const val COMMIT_DATE = /*$ commit_date*/ "2025-04-16T14:12:41+08:00"
4848
var _service: BackupDatabaseService? = null
4949
val service get() = _service!!
5050
var server: MinecraftServer? = null

0 commit comments

Comments
 (0)