Submit: Do not request fields from index when computing topic size
To compute the size of a topic we query for open changes with a matching topic. Since we are only interested in the number of matches we don't need to request any fields. Change-Id: I0f044bc2c30416e42b6c58e0bc1ce5b698f79cce Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -331,7 +331,7 @@ public class Submit
|
|||||||
String topic = change.getTopic();
|
String topic = change.getTopic();
|
||||||
int topicSize = 0;
|
int topicSize = 0;
|
||||||
if (!Strings.isNullOrEmpty(topic)) {
|
if (!Strings.isNullOrEmpty(topic)) {
|
||||||
topicSize = queryProvider.get().byTopicOpen(topic).size();
|
topicSize = queryProvider.get().noFields().byTopicOpen(topic).size();
|
||||||
}
|
}
|
||||||
boolean treatWithTopic = submitWholeTopic && !Strings.isNullOrEmpty(topic) && topicSize > 1;
|
boolean treatWithTopic = submitWholeTopic && !Strings.isNullOrEmpty(topic) && topicSize > 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user