Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Shared/Grpc/EntityConversions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public static DTCore.History.HistoryEvent EncodeUnlockSent(
OrchestrationInstance? instance)
{
P.EntityUnlockSentEvent unlockSentEvent = protoEvent.EntityUnlockSent;
string name = EncodeEventName(null);
string name = "release";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust that this is correct, but can we get context on it? It seems the other encodes use the same EncodeEventName, why is this one different?

If this has always been wrong, can we also get a test for this path that shows it is working? Or is there already a test that has traditionally been flaky and we haven't investigated it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe this PR adds the tests

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe this PR adds the tests

Yes, specifically the test in TwoCriticalSections.cs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust that this is correct, but can we get context on it?

The event name must be encoded the same way as it is decoded on line

else if (name == "release")
.

The format we use here to encode entity messages as events is the same as in DurableTask.Core (for example, event names are defined in
https://github.com/Azure/durabletask/blob/main/src/DurableTask.Core/Entities/EventFormat/EntityMessageEventNames.cs) but it is not technically required to be the same and we do not want to introduce a dependency on the latter, so the class EntityConversions.cs is designed to be self-contained, and now, hopefully, self-consistent.

string input = JsonConvert.SerializeObject(
new ReleaseMessage()
{
Expand Down
Loading