Refactor dirty block management with ConcurrentHashMap and version bump#259
Merged
twisti-dev merged 3 commits intoversion/1.21.11from Mar 21, 2026
Merged
Refactor dirty block management with ConcurrentHashMap and version bump#259twisti-dev merged 3 commits intoversion/1.21.11from
twisti-dev merged 3 commits intoversion/1.21.11from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR bumps the project version and refactors internal “dirty block” tracking in the Bukkit server implementation to use a thread-safe concurrent set, improving safety when dirty tracking is accessed from multiple coroutines/threads.
Changes:
- Bumped
versioningradle.propertiesfrom1.21.11-2.70.0to1.21.11-2.70.1. - Replaced
mutableObjectSetOfwithConcurrentHashMap.newKeySet()forBlockPdcManager.dirtyBlocksto make dirty tracking thread-safe.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| surf-api-bukkit/surf-api-bukkit-server/src/main/kotlin/dev/slne/surf/surfapi/bukkit/server/impl/pdc/block/BlockPdcManager.kt | Switches dirty block tracking to a concurrent set and removes the custom fastutil set usage. |
| gradle.properties | Applies the patch-level version bump for the release containing the internal refactor. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request includes a version bump and an internal improvement to how dirty blocks are tracked in the
BlockPdcManager. The most significant change is the replacement of a custom mutable set with a thread-safe concurrent set for managing dirty blocks, which increases safety in concurrent environments.Version update:
gradle.propertiesfrom1.21.11-2.70.0to1.21.11-2.70.1.Thread safety improvement:
mutableObjectSetOfwithConcurrentHashMap.newKeySetfor thedirtyBlocksset inBlockPdcManager, ensuring thread-safe access and modification.