Remove ChangeAccess.byKey and byKeyRange
All callers of byKeyRange passed key.max() as the right endpoint, so this can be safely replaced with a prefix query against the secondary index. The number of callers notwithstanding, this was pretty straightforward, although it does lead to the almost-recursive state of calling InternalChangeQuery from ChangeQueryBuilder when expanding the conflicts predicate. Change-Id: I073d6ab179d3d5a5d8f0157aa3594fd3ea2cc81c
This commit is contained in:
@@ -526,12 +526,7 @@ public class ChangeUtil {
|
||||
|
||||
// Try isolated changeId
|
||||
if (!id.contains("~")) {
|
||||
Change.Key key = new Change.Key(id);
|
||||
if (key.get().length() == 41) {
|
||||
return db.get().changes().byKey(key).toList();
|
||||
} else {
|
||||
return db.get().changes().byKeyRange(key, key.max()).toList();
|
||||
}
|
||||
return asChanges(queryProvider.get().byKeyPrefix(id));
|
||||
}
|
||||
|
||||
// Try change triplet
|
||||
|
Reference in New Issue
Block a user