Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Conversation

@fluxionary
Copy link
Contributor

@fluxionary fluxionary commented Jul 16, 2022

because of a race condition, the check for whether to regenerate a book entity can happen while the entity is unloaded, resulting in multiple entities per enchanting table. on the your-land server, i've found at least one enchanting table with 391 (!) book entities over the same table.

the fix for this is to not save the entity w/ the mapblock, and to instead re-generate it every time the block is loaded.

@fluxionary
Copy link
Contributor Author

also tried to PR https://github.com/minetest-mods/enchanting, but that's archived and locked for some reason?

Copy link
Member

@Niklp09 Niklp09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works. Will merge in a few days unless there are objections.

@fluxionary fluxionary changed the title avoid race condition whih results in duplicate book entities on the enchanting table avoid race condition which results in duplicate book entities on the enchanting table Jul 22, 2022
@SmallJoker SmallJoker merged commit 4305841 into minetest-mods:master Jul 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants