Optimize organization_user creation on member creation
- switch to use a find first and create if not found paradigm so that we don't waste id allocation - follows https://docs.gitlab.com/ee/development/sql.html#find_or_create_by-is-not-atomic - see https://gitlab.com/gitlab-org/gitlab/-/issues/439062
显示
- app/models/member.rb 1 个添加, 5 个删除app/models/member.rb
- app/models/organizations/organization_user.rb 22 个添加, 1 个删除app/models/organizations/organization_user.rb
- spec/models/member_spec.rb 4 个添加, 3 个删除spec/models/member_spec.rb
- spec/models/organizations/organization_user_spec.rb 39 个添加, 0 个删除spec/models/organizations/organization_user_spec.rb
加载中
想要评论请 注册 或 登录