Retirer le nettoyage/diagnostics de guild_member dans ValidateGuildCache#11
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38492b8fbd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Orphaned guild_member entries can otherwise keep bots in a stale guild state. | ||
| CharacterDatabase.Execute("DELETE FROM guild_member WHERE guildid NOT IN (SELECT guildid FROM guild)"); | ||
|
|
||
| QueryResult result = CharacterDatabase.Query("SELECT guildid, name FROM guild"); |
There was a problem hiding this comment.
Restore orphaned guild_member cleanup in validation
ValidateGuildCache now starts directly with SELECT guildid, name FROM guild and no longer removes orphaned guild_member rows, which reintroduces the manual-table-wipe recovery failure this path was guarding against: bots can still carry stale membership records while PlayerbotFactory::InitGuild only resets runtime guild fields, so the underlying orphaned membership data remains and guild reassignment/recreation can fail repeatedly after guild rows are removed out-of-band.
Useful? React with 👍 / 👎.
Motivation
PlayerbotGuildMgr::ValidateGuildCacheen évitant toute mutation ou diagnostic sur la table coreguild_member, en s'appuyant uniquement sur la lecture de la tableguild.Description
DELETEou le diagnosticSELECT COUNT(*) ...etLOG_WARN, de sorte queValidateGuildCachecommence directement parQueryResult result = CharacterDatabase.Query("SELECT guildid, name FROM guild");.Testing
git show --stat --oneline -1,git diff -- src/Mgr/Guild/PlayerbotGuildMgr.cpp, affichage partiel du fichier avecnl -ba src/Mgr/Guild/PlayerbotGuildMgr.cpp | sed -n '186,206p'et le commit final viagit add+git commitetgit rev-parse --short HEAD, toutes ces commandes ont réussi.Codex Task