Re: Review of lock-many API
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 3 Apr 2014 19:07:09 +0100 (BST)
Hi Philip.
Philip Martin wrote:
> Julian Foad writes:
>> - /* The client expects results in the same order as paths were supplied. */
AFAICT, if I'm reading this right, then a valid reason for not finding a result here is if svn_repos_fs_lock_many returned an error overall, having locked some but not all of the paths. Doesn't really matter why.
Breaking here seems wrong. We're processing the targets in this loop in a different order from the hash order that svn_repos_fs_lock_many() was using to lock them. Therefore we are potentially stopping before we have given responses to all the paths that were successfully locked. We would stop the response list at this point, and terminate it with a successful "done" keyword, but the response list would have too few elements. This seems arbitrary and broken.
I can think of two alternatives. We could just not generate a response list in the case where svn_repos_fs_lock_many returns an error, but simply report the error. That's effectively no worse than the current behaviour. Or we could insert an error response or some sort of place-holder entry in the list for this target, and then continue to the next target, to give a full response.
Does that make sense and would either of those options work?
- Julian
>> Breaking here would signal to the client that
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.