While working on
DM-21451, I noticed that the Datastore base class approach to transactions (which involves saving a journal of operations to undo) isn't a good match to ChainedDatastore, which would behave more correctly if it implemented its own transactions by opening transaction blocks for all nested datastores.
Before doing that, we should probably move the undo-journal logic down to GenericBaseDatastore or FileLikeDatastore, and then make the base Datastore.transaction method abstract. It would then be a good idea to do a sweep of Datastore's mutating methods and make sure they're decorated with transactional consistently across all subclasses.
I don't think this is a super high priority, but it's something we'll want to get right eventually.