To clarify everything in advance:
by default, all entries in a RavenDB session between calls .SaveChanges()are all-or-none. If for any reason one operation fails, all changes in the current session / after the last save will be discarded. This feature, combined with the optimistic inclusion of concurrency, is very powerful. If you need a longer transaction, there is support for System.Transaction, and this works as expected.
As for the shards:
There is no true support for distributed transactions in custom setup. However, due to the location of the background documents in a good scalding strategy, you may have a transactional record in each of your stores. They just work as if there were no shards at all.
source