Repository navigation
fix: player data shutdown loss [EcoHub-312] - #676
Conversation
There was a problem hiding this comment.
Actionable comments posted: 2

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: QUIET
- Plan: Advanced
- Run ID:
7e0572d9-0286-4c55-bbce-f83dc4c8f135
Files selected for processing: 8-
eco-api/src/main/java/com/willfp/eco/core/data/handlers/PersistentDataHandler.javaeco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/ServerLocking.kteco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileHandler.kteco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileWriter.kteco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/impl/EcoProfile.kteco-core/core-plugin/src/test/kotlin/com/willfp/eco/internal/spigot/data/handlers/PersistentDataHandlerShutdownTests.kteco-core/core-plugin/src/test/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileSyncHookTests.kteco-core/core-plugin/src/test/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileWriterTests.kt
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
-
There was a problem hiding this comment.
Actionable comments posted: 2

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
381e5884-bd31-4af1-a834-ea96daffe256
Files selected for processing: 2-
eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileHandler.kteco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileWriter.kt
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
-
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Major · Close the writer before the final drain. · ProfileWriter.kt:72-85
eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileWriter.kt:72-85
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftClose the writer before the final drain.
ProfileWriter.write()can replace a queued value whileflush()is iteratingvaluesToWrite. The iterator can pass the old value, and the conditional removal then leaves the replacement queued.ProfileHandler.save()performs one flush before it shuts down the handlers. A replacement written during shutdown can therefore remain uncommitted and be lost.Stop new profile writes before the final drain, then shut down the handlers. A second unsynchronised
flush()is not sufficient because another write can arrive during that flush. The correction belongs at the shutdown boundary, withProfileWriterproviding the coordination if needed.

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
79f8a5b3-d958-4aa3-9c81-6af4ad12ec90
Files selected for processing: 2-
eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileHandler.kteco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/RedisProfileSync.kt
Limit details: You’ve used all 10 included reviews currently available.
-
|
@coderabbitai resume |
✅ Action performed
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
25b72fe9-804d-4669-96b8-b434f265ed19
Files selected for processing: 3-
eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileHandler.kteco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileWriter.kteco-core/core-plugin/src/test/kotlin/com/willfp/eco/internal/spigot/data/profiles/ProfileWriterTests.kt
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
-
No description provided.