Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Fix for UpdateIAmAlive in CosmosDBMembershipTable.cs #49

Closed
wants to merge 2 commits into from
Closed

Fix for UpdateIAmAlive in CosmosDBMembershipTable.cs #49

wants to merge 2 commits into from

Conversation

NickBarrett
Copy link
Contributor

Hello again folks,

We have been trying out Cosmos Db based clustering and came across issue 6987 already reported in the dotnet/orleans repo.

On investigation, the issue is caused by Orleans passing a MembershipEntry to UpdateIAmAlive that only has the SiloAddress and IAmAliveTime properties filed with data. After being converted to a SiloEntity by ConstructSiloEntityId, the save to Cosmos Db would fail due to StartTime (as well as the rest of the properties) just being their default values.

This pr pulls the existing SiloEntity from Cosmos Db, updates the IAmAliveTime property and saves it back to Cosmos Db.

From what we can tell, this is what used to happen in UpdateIAmAlive.js before it was removed.

Cheers,

Nick

… passed in from Orleans only contained SiloAddress and IAmAliveTime. The code now reads the existing state from Cosmos Db, updates IAmAliveTime and writes it back. From what I can see, this is what UpdateIAmAlive.js used to do.
@ReubenBond
Copy link
Contributor

Apologies for not getting to this sooner, @NickBarrett! I was unable to push updates to your PR branch, so I pushed them to a new PR: #51

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants