-
Proposal:
Show
Clients MUST specify a content-id header for each request within a changeset.
Servers MAY return responses within a changeset in any order.
Servers MUST include the content-id header in each response, so clients can correlate requests and responses.
Accepted: https://www.oasis-open.org/apps/org/workgroup/odata/download.php/47764/latest/odata-meeting-19_on-20121220-minutes.html
-
Resolution:
Show
https://www.oasis-open.org/committees/download.php/48439/odata-core-v4.0-wd01-part1-protocol-2013-03-05-RH.doc
Accepted: https://www.oasis-open.org/committees/download.php/48549/odata-meeting-29_on-20130314-minutes.html#odata-157
The current $batch specification says that requests within a changeset need not be processed in the same order they are specified. For example, a service may re-order changes to reduce the likelihood of integrity violations by first doing deletes, then inserts, then updates. It goes on to say that the responses in a changeset must be 1:1 with the requests, but does not say they must be in the same order, and does not say how a client correlates a response within a changeset with a particular request within that changeset.
Changesets do describe the use of a content-id header for allowing a statement within a batch to reference the results of a previous statement within the batch. For example, to add an order to a customer that was added within the same batch. However, it does not say that it is mandatory for the client to specify the content-id header for requests within a batch, nor does it say that it is mandatory for a service to return content-id headers supplied within the batch.
It seems simplest to say that clients SHOULD specify a content-id header for requests within a changeset, and that service MUST return the content-id (if any) specified by the client. This allows the service to re-order changes within the changeset without having to buffer the response, and is arguably simpler for the client to correlate responses without having to rely on ordering.
{"report":{"apdex":1,"isInitial":true,"journeyId":"b08f3ed8-cdda-439e-8568-c618c4d20c28","key":"jira.project.issue.view-issue","navigationType":0,"readyForUser":841.5,"redirectCount":0,"resourceLoadedEnd":850,"resourceLoadedStart":196.2000002861023,"resourceTiming":[{"duration":223.5,"initiatorType":"link","name":"https://issues.oasis-open.org/s/3edeca31ab9ba77980aae0809fbe7121-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/css/_super/batch.css","startTime":196.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":196.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":419.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":223.5,"initiatorType":"link","name":"https://issues.oasis-open.org/s/7d2823769c2e7b66e860863fe879b7f8-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/css/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&richediton=true","startTime":196.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":196.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":420,"responseStart":0,"secureConnectionStart":0},{"duration":223.5,"initiatorType":"link","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.css","startTime":196.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":196.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":420.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":271.80000019073486,"initiatorType":"link","name":"https://issues.oasis-open.org/s/645acc233eb869f48a571293b8358a7d-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static-adgs/jira.webresources:global-static-adgs.css","startTime":197,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":197,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":468.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":273.09999990463257,"initiatorType":"link","name":"https://issues.oasis-open.org/s/a0dd6509771c1de0667aae5429c04cda-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static/jira.webresources:global-static.css","startTime":197.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":197.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":470.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":322.40000009536743,"initiatorType":"script","name":"https://issues.oasis-open.org/s/e5479157e7a0c08b005e6522f2f04104-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/js/_super/batch.js?locale=en-US","startTime":197.30000019073486,"connectEnd":197.30000019073486,"connectStart":197.30000019073486,"domainLookupEnd":197.30000019073486,"domainLookupStart":197.30000019073486,"fetchStart":197.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":197.30000019073486,"responseEnd":519.7000002861023,"responseStart":519.5999999046326,"secureConnectionStart":197.30000019073486},{"duration":338.90000009536743,"initiatorType":"script","name":"https://issues.oasis-open.org/s/83514d5d4e8543747b02042eafcdc99c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/js/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":197.90000009536743,"connectEnd":197.90000009536743,"connectStart":197.90000009536743,"domainLookupEnd":197.90000009536743,"domainLookupStart":197.90000009536743,"fetchStart":197.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":197.90000009536743,"responseEnd":536.8000001907349,"responseStart":536.8000001907349,"secureConnectionStart":197.90000009536743},{"duration":340.7999997138977,"initiatorType":"script","name":"https://issues.oasis-open.org/s/70bb2263e59e7e1f04fbd137c80b895b-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/aae1242f5fc81cc6a5bb8bc963ccda29/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en-US","startTime":198.2000002861023,"connectEnd":198.2000002861023,"connectStart":198.2000002861023,"domainLookupEnd":198.2000002861023,"domainLookupStart":198.2000002861023,"fetchStart":198.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":198.2000002861023,"responseEnd":539,"responseStart":539,"secureConnectionStart":198.2000002861023},{"duration":341.19999980926514,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":198.30000019073486,"connectEnd":198.30000019073486,"connectStart":198.30000019073486,"domainLookupEnd":198.30000019073486,"domainLookupStart":198.30000019073486,"fetchStart":198.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":198.30000019073486,"responseEnd":539.5,"responseStart":539.5,"secureConnectionStart":198.30000019073486},{"duration":341.40000009536743,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":198.5,"connectEnd":198.5,"connectStart":198.5,"domainLookupEnd":198.5,"domainLookupStart":198.5,"fetchStart":198.5,"redirectEnd":0,"redirectStart":0,"requestStart":198.5,"responseEnd":539.9000000953674,"responseStart":539.9000000953674,"secureConnectionStart":198.5},{"duration":341.80000019073486,"initiatorType":"script","name":"https://issues.oasis-open.org/s/cda37faab827dbdf305de8efe8282062-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.js?locale=en-US","startTime":198.59999990463257,"connectEnd":198.59999990463257,"connectStart":198.59999990463257,"domainLookupEnd":198.59999990463257,"domainLookupStart":198.59999990463257,"fetchStart":198.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":198.59999990463257,"responseEnd":540.4000000953674,"responseStart":540.3000001907349,"secureConnectionStart":198.59999990463257},{"duration":342.19999980926514,"initiatorType":"link","name":"https://issues.oasis-open.org/s/07245784f53abc49bad9d9d4d36c577a-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/cadc4f20cc5c138dee060d42cf85f220/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":198.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":198.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":541,"responseStart":0,"secureConnectionStart":0},{"duration":341.80000019073486,"initiatorType":"script","name":"https://issues.oasis-open.org/rest/api/1.0/shortcuts/803004/a29179d70fa8562374ee16707692af77/shortcuts.js?context=issuenavigation&context=issueaction","startTime":199,"connectEnd":199,"connectStart":199,"domainLookupEnd":199,"domainLookupStart":199,"fetchStart":199,"redirectEnd":0,"redirectStart":0,"requestStart":199,"responseEnd":540.8000001907349,"responseStart":540.8000001907349,"secureConnectionStart":199},{"duration":425.90000009536743,"initiatorType":"link","name":"https://issues.oasis-open.org/s/f77fd89aa211a76b20e9b0e63564383c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.css?jira.create.linked.issue=true&richediton=true","startTime":237.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":663.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":348.59999990463257,"initiatorType":"script","name":"https://issues.oasis-open.org/s/41525c48ddceeb9b11e54085268fc285-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.js?jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":238.2000002861023,"connectEnd":238.2000002861023,"connectStart":238.2000002861023,"domainLookupEnd":238.2000002861023,"domainLookupStart":238.2000002861023,"fetchStart":238.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":238.2000002861023,"responseEnd":586.8000001907349,"responseStart":586.8000001907349,"secureConnectionStart":238.2000002861023}],"threshold":1000,"fetchStart":1,"domainLookupStart":81,"domainLookupEnd":81,"connectStart":81,"connectEnd":130,"secureConnectionStart":105,"requestStart":130,"responseStart":189,"responseEnd":273,"domLoading":192,"domInteractive":920,"domContentLoadedEventStart":920,"domContentLoadedEventEnd":972,"domComplete":1069,"loadEventStart":1069,"loadEventEnd":1073,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[],"measures":[],"correlationId":"99c6cb782d14a0","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":117,"dbReadsTimeInMs":20,"dbConnsTimeInMs":24,"applicationHash":"4d4040e0714d65b7fffa4801569d014c0b16eaa9","experiments":[]}}
The GET scenario is better served by returning Accepted in the batch an allowing the client to fetch as they are available. For changesets, the results are required to be atomic so the changeset cannot return success or failure until all of the statements within it complete, so there is still value in allowing the service to reorder statements within a changeset.