lasdf1234 opened a new pull request, #14015: URL: https://github.com/apache/gravitino/pull/14015
**Cherry-pick Information:** - Original commit: fdb03ed44844b636f3d77a5652c968e98e36c20a - Target branch: `branch-1.3` - Status: Clean cherry-pick adapted for branch-1.3 (no conflict markers). ### What changes were proposed in this pull request? Backport [#13965](https://github.com/apache/gravitino/pull/13965) / [#13964](https://github.com/apache/gravitino/issues/13964) to `branch-1.3`: - 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 ### Backport notes - `branch-1.3` does not include the local-user `enabled` flag from main, so this uses the 2-arg `newUserPO(username, passwordHash)` instead of `newUserPO(..., true)`. - Replaces auto cherry-pick [#13988](https://github.com/apache/gravitino/pull/13988), which landed with unresolved conflict markers. ### 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 ### 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]
