Tim thinks that deadlocking may be cause by batch inserting records in non-primary-key order. We'll sort before we do batch inserts, but it would be a good idea to do this on the client to. We also need to remember to support by collection *and* ID once we support multiple-collections functions (which we don't currently)
Created attachment 463642 [details] [diff] [review] Sorts incoming items by their id and id key parameters by id
Fixed in http://hg.mozilla.org/services/sync-server/rev/06e6c6fbfeab Will not make Monday's push, obviously.