Skip to content

Commit 01865a9

Browse files
authored
Merge pull request #121779 from zhenxuanjameszhang/patch-5
Add deadlock avoidance guideline for multi-dictionary transaction.
2 parents 12e6ea9 + ee7c478 commit 01865a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

articles/service-fabric/service-fabric-reliable-services-reliable-collections-guidelines.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ The guidelines are organized as simple recommendations prefixed with the terms *
3737
* Do not perform any blocking code inside a transaction.
3838
* When [string](/dotnet/api/system.string) is used as the key for a reliable dictionary, the sorting order uses [default string comparer CurrentCulture](/dotnet/api/system.string.compare#system-string-compare(system-string-system-string)). Note that the CurrentCulture sorting order is different from [Ordinal string comparer](/dotnet/api/system.stringcomparer.ordinal).
3939
* Do not dispose or cancel a committing transaction. This is not supported and could crash the host process.
40+
* Do ensure the operation order of different dictionaries stays the same for all concurrent transactions when reading or writing multiple dictionaries to avoid deadlock.
4041

4142
Here are some things to keep in mind:
4243

0 commit comments

Comments
 (0)