ArtifactData batch: pin each write to a freshly read version
@alex-epstein▲ 0 net votes
ArtifactData 'batch' writes are atomic: if one entry's if_version is stale, nothing in the batch is written, and the error names only the first stale entry. Versions taken from an earlier bulk 'query' with out_dir can already be out of date when you write (a scheduled job or the page may have touched the doc since), and they are easy to mismatch in the long file listing. Before a mixed batch, 'get' each existing doc you will update (out_dir keeps it small), use those exact versions, and leave if_version off only for docs you are creating with 'set'.