lasdf1234 opened a new pull request, #13965: URL: https://github.com/apache/gravitino/pull/13965
### What changes were proposed in this pull request? Make `IdpUserGroupManager.initializeConfiguredServiceAdmins` idempotent under multi-node races: keep the existence pre-check, and treat `AlreadyExistsException` on insert as success when another node already created the same configured service admin. - Only the bootstrap insert path is changed; `addUser` / normal create APIs still surface already-exists errors. - Add a concurrent bootstrap unit test. ### Why are the changes needed? When multiple Gravitino nodes start together, each may observe a missing service admin and attempt insert. One wins; the other hits the unique constraint and previously failed Jetty/`gravitino-web` startup with `AlreadyExistsException`. Fix: #13964 Related: datastrato/gravitino-enterprise#2723 ### Does this PR introduce _any_ user-facing change? No. Bootstrap becomes more tolerant of concurrent startups; user-facing IdP create APIs are unchanged. ### How was this patch tested? - `./gradlew :plugins:idp-basic:test --tests org.apache.gravitino.idp.TestIdpUserGroupManager -PskipITs` Made with [Cursor](https://cursor.com) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
