[PR #7429] [MERGED] Clear stale rest-024 region-storage-upgrader rows the tree implements #7598

Closed
opened 2026-11-03 07:20:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7429
Author: @MSedgeMC
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: chore/ledger2-rest-024


📝 Commits (1)

  • f0bbdbe Port map: rest-024 rows the tree answers

📊 Changes

1 file changed (+8 additions, -8 deletions)

View changed files

📝 tools/port_map/rest-024.tsv (+8 -8)

📄 Description

tools/port_map/rest-024.tsv, eight rows, all repointed from crates/horizon-world/src/datafix/files.rs::upgrade_regions to crates/horizon-world/src/datafix/world_upgrader.rs, which carries RegionStorageUpgrader on its own:

  • RegionStorageUpgrader.init -> ::RegionStorageUpgrader::init — the dimension's region folder is resolved and its chunk positions counted into the UpgradeProgress totals (the "no progress object" gap is gone).
  • RegionStorageUpgrader.upgrade -> ::RegionStorageUpgrader::upgrade — the per-file, per-chunk loop runs until progress.is_canceled(), counts converted and skipped chunks and sets dimension and total progress (the "no progress, cancel or recreate mode" gap is gone: recreate_region_files is in the builder and picks the output folder).
  • RegionStorageUpgrader.createStorage -> ::RegionStorageUpgrader::upgrade — the reader and writer region files are opened lazily per file, and with recreate_region_files the writer opens the file in the new folder.
  • RegionStorageUpgrader.getFilesToProcess -> ::RegionStorageUpgrader::init — all_chunk_positions lists the .mca files and their chunks and init adds them to the progress totals.
  • RegionStorageUpgrader.getAllChunkPositions -> ::all_chunk_positions — walks each region file's header for the chunk positions it holds.
  • RegionStorageUpgrader.processOnePosition -> ::RegionStorageUpgrader::process_one_position — the per-chunk fix, counting converted and skipped chunks; a failed chunk is logged.
  • RegionStorageUpgrader.tryProcessOnePosition -> ::RegionStorageUpgrader::try_process_one_position — only a chunk whose tag changed is written back, or every chunk with recreate_region_files (the "every chunk is rewritten" gap is gone).
  • RegionStorageUpgrader.onFileFinished -> ::RegionStorageUpgrader::on_file_finished — the rewritten file replaces the old one, and close drops the recreate folder.

The file's missing rows were rechecked and stay: FloatProviders.codec, IntProviders.validateCodec, IntProviders.validate (the provider bounds checks are inside value_provider.rs::FloatProvider::from_json / IntProvider::decode, not the window check validateCodec makes), MultipliedFloats.sample (no nested provider product) and LongJumpUtil.isClearTransition's siblings as they stand.

map-check: python3 tools/port_ledger.py map-check tools/port_map/rest-024.tsv -> 150 rows, no problems.

Proven: python3 tools/port_ledger.py build --jar /data/home/horizon/.local/minecraft/26.3/jars/server.jar >/dev/null && python3 tools/port_ledger.py map-check tools/port_map/rest-024.tsv -> 150 rows, no problems.

Not proven: no in-game check; no Optimize World run over a real world.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7429 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/ledger2-rest-024` --- ### 📝 Commits (1) - [`f0bbdbe`](https://github.com/horizon-rust/horizon/commit/f0bbdbec9657903638f3031d1c4f6f4b5f1f197a) Port map: rest-024 rows the tree answers ### 📊 Changes **1 file changed** (+8 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-024.tsv` (+8 -8) </details> ### 📄 Description `tools/port_map/rest-024.tsv`, eight rows, all repointed from `crates/horizon-world/src/datafix/files.rs::upgrade_regions` to `crates/horizon-world/src/datafix/world_upgrader.rs`, which carries `RegionStorageUpgrader` on its own: - `RegionStorageUpgrader.init` -> `::RegionStorageUpgrader::init` — the dimension's region folder is resolved and its chunk positions counted into the `UpgradeProgress` totals (the "no progress object" gap is gone). - `RegionStorageUpgrader.upgrade` -> `::RegionStorageUpgrader::upgrade` — the per-file, per-chunk loop runs until `progress.is_canceled()`, counts converted and skipped chunks and sets dimension and total progress (the "no progress, cancel or recreate mode" gap is gone: `recreate_region_files` is in the builder and picks the output folder). - `RegionStorageUpgrader.createStorage` -> `::RegionStorageUpgrader::upgrade` — the reader and writer region files are opened lazily per file, and with `recreate_region_files` the writer opens the file in the new folder. - `RegionStorageUpgrader.getFilesToProcess` -> `::RegionStorageUpgrader::init` — `all_chunk_positions` lists the `.mca` files and their chunks and `init` adds them to the progress totals. - `RegionStorageUpgrader.getAllChunkPositions` -> `::all_chunk_positions` — walks each region file's header for the chunk positions it holds. - `RegionStorageUpgrader.processOnePosition` -> `::RegionStorageUpgrader::process_one_position` — the per-chunk fix, counting converted and skipped chunks; a failed chunk is logged. - `RegionStorageUpgrader.tryProcessOnePosition` -> `::RegionStorageUpgrader::try_process_one_position` — only a chunk whose tag changed is written back, or every chunk with `recreate_region_files` (the "every chunk is rewritten" gap is gone). - `RegionStorageUpgrader.onFileFinished` -> `::RegionStorageUpgrader::on_file_finished` — the rewritten file replaces the old one, and `close` drops the recreate folder. The file's `missing` rows were rechecked and stay: `FloatProviders.codec`, `IntProviders.validateCodec`, `IntProviders.validate` (the provider bounds checks are inside `value_provider.rs::FloatProvider::from_json` / `IntProvider::decode`, not the window check `validateCodec` makes), `MultipliedFloats.sample` (no nested provider product) and `LongJumpUtil.isClearTransition`'s siblings as they stand. `map-check`: `python3 tools/port_ledger.py map-check tools/port_map/rest-024.tsv` -> `150 rows, no problems.` **Proven:** `python3 tools/port_ledger.py build --jar /data/home/horizon/.local/minecraft/26.3/jars/server.jar >/dev/null && python3 tools/port_ledger.py map-check tools/port_map/rest-024.tsv` -> `150 rows, no problems.` **Not proven:** no in-game check; no Optimize World run over a real world. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:20:33 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7598
No description provided.