Skip to content

Feature/storage redesign - #332

Closed
Nighterezi wants to merge 9 commits into
mainfrom
feature/storage-redesign
Closed

Feature/storage redesign#332
Nighterezi wants to merge 9 commits into
mainfrom
feature/storage-redesign

Conversation

@Nighterezi

Copy link
Copy Markdown
Contributor

No description provided.

Nighterezi and others added 9 commits August 27, 2026 11:42
Completes the storage & view redesign for 1.9.0.

Phase 3 — version-based sync:
- storageVersion bumped on every virtual-inventory mutation (loot, take,
  sell, drop). The batched update task refreshes storage viewers whose
  cached image is behind the version, replacing the per-mutation push in
  updateSpawnerMenuViewers.

Phase 4 — frozen display order:
- The item order is pinned while a spawner is being viewed; freshly
  generated loot appends at the end instead of reshuffling. A lazy grace
  window (no scheduler) keeps the order across a quick reopen and re-sorts
  after ~3s empty. Sorting re-pins and bumps the version.

Phase 5a — schema v5 optimistic concurrency:
- New rev column with compare-and-set on flush (last-writer-wins), a
  tripwire for a foreign writer surviving across a flush cycle. Upsert
  replaced by per-row CAS UPDATE/INSERT; migration v4 -> v5 adds the column.

Also lands the earlier phases already staged on this branch (slot-based
capacity + smart paging, diff rendering, dupe-safe transactional takes)
and bumps the version to 1.9.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the "Phase N" scaffolding tags left in the storage redesign and
trim redundant inline comments; the explanations now live in Javadoc.
No behaviour change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The per-location lock existed to serialize a GUI destack against a pickaxe
break on the same spawner. The GUI stacker was removed, so that race no
longer exists and the lock is redundant:

- break vs break at a location is already serialized on the region thread
- break vs removal both mutate on the location thread (runLocationTask)
- removal vs removal dedupes via pendingRemoval* concurrent sets
- anything vs sell is guarded by isSelling() CAS

Drop the manager, its wiring in SmartSpawner, and the tryLock/unlock/removeLock
calls in SpawnerBreakListener and SpawnerRemovalService. Update the concurrency
reference doc accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bring in the cherry-picked SpawnerLocationLockManager removal from main so
release/1.9.0 is no longer behind. Both branches carry the identical change,
so the merge is a no-op on the tree.
# Conflicts:
#	build.gradle.kts
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Nighterezi Nighterezi closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant