Hi Marcel,

Probably below code can be simplified using the Lists.partition(list,size) [1]

> -            // update if this is the last path or
> -            // revision is not equal to last revision
> -            if (i + 1 >= paths.size() || size == ids.size()) {
> +            // call update if any of the following is true:
> +            // - this is the last path
> +            // - revision is not equal to last revision (size of ids didn't 
> change)
> +            // - the update limit is reached
> +            if (i + 1 >= paths.size()
> +                    || size == ids.size()
> +                    || ids.size() >= BACKGROUND_MULTI_UPDATE_LIMIT) {
>                  store.update(Collection.NODES, ids, updateOp);
>                  for (String id : ids) {
>                      unsavedLastRevisions.remove(Utils.getPathFromId(id));
>


Chetan Mehrotra
[1] 
http://docs.guava-libraries.googlecode.com/git-history/release/javadoc/com/google/common/collect/Lists.html#partition(java.util.List,
int)

Reply via email to