JasperFx / marten

.NET Transactional Document DB and Event Store on PostgreSQL
https://martendb.io
MIT License
2.74k stars 428 forks source link

Improve UnitOfWork.Sort to use a stable sorting algorithm #3264

Closed haefele closed 3 weeks ago

haefele commented 3 weeks ago

This allows operations with same priority, to keep their relative order.

In my case, it keeps the order intact between Upsert-operations for Folders.

The test I added successfully reproduced the issue, and works now after the small change to UnitOfWork.Sort.