roryqi commented on code in PR #11226:
URL: https://github.com/apache/gravitino/pull/11226#discussion_r3311420757


##########
plugins/idp-basic/src/main/java/org/apache/gravitino/idp/IdpUserGroupManager.java:
##########
@@ -48,14 +54,40 @@ public class IdpUserGroupManager implements Closeable {
   private static final IdpUserMetaService USER_SERVICE = 
IdpUserMetaService.getInstance();
   private static final IdpGroupMetaService GROUP_SERVICE = 
IdpGroupMetaService.getInstance();
 
+  private static volatile IdpUserGroupManager instance;
+
   private final IdpRelationalStorage relationalStorage;
+  private final IdpGarbageCollector garbageCollector;
   private final IdGenerator idGenerator;
   private final PasswordHasher passwordHasher;
-  private final IdpGarbageCollector garbageCollector;
+
+  /**
+   * Returns the shared built-in IdP user and group manager for the server 
process.
+   *
+   * @param config The server configuration.
+   * @param idGenerator The id generator.
+   * @return The singleton manager instance.
+   */
+  public static IdpUserGroupManager getInstance(Config config, IdGenerator 
idGenerator) {

Review Comment:
   Singleton design mode isn't correct.



-- 
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]

Reply via email to