NServiceBus.Persistence.Sql icon indicating copy to clipboard operation
NServiceBus.Persistence.Sql copied to clipboard

Performance hit when UPDATE while saga state is unchanged results in updating saga state with same data

Open ramonsmits opened this issue 5 years ago • 0 comments

When there are no saga state changes we will still do an UPDATE with the saga state

https://github.com/Particular/NServiceBus.Persistence.Sql/blob/9affa576774df39fe4b746409329eb181e1dbab6/src/SqlPersistence/Saga/SqlDialect_MsSqlServer.cs#L71-L78

Unnecessary network IO is spent which will be problematic if the saga state gets large.

Consider implementing "dynamic" updates. Meaning, only include the saga state when changed.

ramonsmits avatar May 20 '20 16:05 ramonsmits