Fix memberIn() operator for non-internal groups
The cache should just query the database for any usage of the UUID given as the cache key. Change-Id: I94ac67ee7598503b78ae87ec88f32c683b555696
This commit is contained in:
@@ -176,14 +176,9 @@ public class GroupIncludeCacheImpl implements GroupIncludeCache {
|
||||
public Set<AccountGroup.UUID> load(AccountGroup.UUID key) throws Exception {
|
||||
final ReviewDb db = schema.open();
|
||||
try {
|
||||
List<AccountGroup> group = db.accountGroups().byUUID(key).toList();
|
||||
if (group.size() != 1) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
Set<AccountGroup.Id> ids = Sets.newHashSet();
|
||||
for (AccountGroupIncludeByUuid agi : db.accountGroupIncludesByUuid()
|
||||
.byIncludeUUID(group.get(0).getGroupUUID())) {
|
||||
.byIncludeUUID(key)) {
|
||||
ids.add(agi.getGroupId());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user