support write batches from serialized form, upstream commit