Skip to content

Retirer le nettoyage/diagnostics de guild_member dans ValidateGuildCache#11

Closed
Wishmaster117 wants to merge 1 commit intoRestore-bot-guilds-creation-logic-when-guild-data-is-wipedfrom
codex/evaluer-les-commentaires-du-reviewer
Closed

Retirer le nettoyage/diagnostics de guild_member dans ValidateGuildCache#11
Wishmaster117 wants to merge 1 commit intoRestore-bot-guilds-creation-logic-when-guild-data-is-wipedfrom
codex/evaluer-les-commentaires-du-reviewer

Conversation

@Wishmaster117
Copy link
Copy Markdown
Owner

Motivation

  • Simplifier PlayerbotGuildMgr::ValidateGuildCache en évitant toute mutation ou diagnostic sur la table core guild_member, en s'appuyant uniquement sur la lecture de la table guild.

Description

  • Supprime le bloc de code qui exécutait une requête/DELETE ou le diagnostic SELECT COUNT(*) ... et LOG_WARN, de sorte que ValidateGuildCache commence directement par QueryResult result = CharacterDatabase.Query("SELECT guildid, name FROM guild");.

Testing

  • Exécuté des vérifications automatiques sur le dépôt : git show --stat --oneline -1, git diff -- src/Mgr/Guild/PlayerbotGuildMgr.cpp, affichage partiel du fichier avec nl -ba src/Mgr/Guild/PlayerbotGuildMgr.cpp | sed -n '186,206p' et le commit final via git add + git commit et git rev-parse --short HEAD, toutes ces commandes ont réussi.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant