Merge changes from topic "group-cache-size"
* changes: Make the group caches unlimited by default Document the groups_byname and groups_byuuid caches
This commit is contained in:
@@ -740,6 +740,9 @@ Default is 1024 for most caches, except:
|
|||||||
* `"diff"`: default is `10m` (10 MiB of memory)
|
* `"diff"`: default is `10m` (10 MiB of memory)
|
||||||
* `"diff_intraline"`: default is `10m` (10 MiB of memory)
|
* `"diff_intraline"`: default is `10m` (10 MiB of memory)
|
||||||
* `"diff_summary"`: default is `10m` (10 MiB of memory)
|
* `"diff_summary"`: default is `10m` (10 MiB of memory)
|
||||||
|
* `"groups"`: default is unlimited
|
||||||
|
* `"groups_byname"`: default is unlimited
|
||||||
|
* `"groups_byuuid"`: default is unlimited
|
||||||
* `"plugin_resources"`: default is 2m (2 MiB of memory)
|
* `"plugin_resources"`: default is 2m (2 MiB of memory)
|
||||||
|
|
||||||
+
|
+
|
||||||
@@ -841,9 +844,40 @@ like the Linux kernel repository).
|
|||||||
|
|
||||||
cache `"groups"`::
|
cache `"groups"`::
|
||||||
+
|
+
|
||||||
Caches the basic group information from the `account_groups` table,
|
Caches the basic group information of internal groups by group ID,
|
||||||
including the group owner, name, and description.
|
including the group owner, name, and description.
|
||||||
+
|
+
|
||||||
|
For this cache it is important to configure a size that is larger than
|
||||||
|
the number of internal Gerrit groups, otherwise general Gerrit
|
||||||
|
performance may be poor. This is why by default this cache is
|
||||||
|
unlimited.
|
||||||
|
+
|
||||||
|
External group membership obtained from LDAP is cached under
|
||||||
|
`"ldap_groups"`.
|
||||||
|
|
||||||
|
cache `"groups_byname"`::
|
||||||
|
+
|
||||||
|
Caches the basic group information of internal groups by group name,
|
||||||
|
including the group owner, name, and description.
|
||||||
|
+
|
||||||
|
For this cache it is important to configure a size that is larger than
|
||||||
|
the number of internal Gerrit groups, otherwise general Gerrit
|
||||||
|
performance may be poor. This is why by default this cache is
|
||||||
|
unlimited.
|
||||||
|
+
|
||||||
|
External group membership obtained from LDAP is cached under
|
||||||
|
`"ldap_groups"`.
|
||||||
|
|
||||||
|
cache `"groups_byuuid"`::
|
||||||
|
+
|
||||||
|
Caches the basic group information of internal groups by group UUID,
|
||||||
|
including the group owner, name, and description.
|
||||||
|
+
|
||||||
|
For this cache it is important to configure a size that is larger than
|
||||||
|
the number of internal Gerrit groups, otherwise general Gerrit
|
||||||
|
performance may be poor. This is why by default this cache is
|
||||||
|
unlimited.
|
||||||
|
+
|
||||||
External group membership obtained from LDAP is cached under
|
External group membership obtained from LDAP is cached under
|
||||||
`"ldap_groups"`.
|
`"ldap_groups"`.
|
||||||
|
|
||||||
|
|||||||
@@ -52,12 +52,15 @@ public class GroupCacheImpl implements GroupCache {
|
|||||||
@Override
|
@Override
|
||||||
protected void configure() {
|
protected void configure() {
|
||||||
cache(BYID_NAME, AccountGroup.Id.class, new TypeLiteral<Optional<InternalGroup>>() {})
|
cache(BYID_NAME, AccountGroup.Id.class, new TypeLiteral<Optional<InternalGroup>>() {})
|
||||||
|
.maximumWeight(Long.MAX_VALUE)
|
||||||
.loader(ByIdLoader.class);
|
.loader(ByIdLoader.class);
|
||||||
|
|
||||||
cache(BYNAME_NAME, String.class, new TypeLiteral<Optional<InternalGroup>>() {})
|
cache(BYNAME_NAME, String.class, new TypeLiteral<Optional<InternalGroup>>() {})
|
||||||
|
.maximumWeight(Long.MAX_VALUE)
|
||||||
.loader(ByNameLoader.class);
|
.loader(ByNameLoader.class);
|
||||||
|
|
||||||
cache(BYUUID_NAME, String.class, new TypeLiteral<Optional<InternalGroup>>() {})
|
cache(BYUUID_NAME, String.class, new TypeLiteral<Optional<InternalGroup>>() {})
|
||||||
|
.maximumWeight(Long.MAX_VALUE)
|
||||||
.loader(ByUUIDLoader.class);
|
.loader(ByUUIDLoader.class);
|
||||||
|
|
||||||
bind(GroupCacheImpl.class);
|
bind(GroupCacheImpl.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user