Current implementation of UpdateIAmAlive method for SingleMembership uses update of member qualified by its full path in document, but this update works even if there is no subdocument for given silo. It creates a new document with IAmAlive as its only property (due to some race condition in Orleans membership, when UpdateIAmAlive can be invoked before Insert/Upsert). This invalid document leads to fail for every subsequent read from table, as most of properties in document are BsonRequired.
My fix will ensure that either silo subdocument exists, and change is written, or not, and change is ignored.
Current implementation of UpdateIAmAlive method for SingleMembership uses update of member qualified by its full path in document, but this update works even if there is no subdocument for given silo. It creates a new document with IAmAlive as its only property (due to some race condition in Orleans membership, when UpdateIAmAlive can be invoked before Insert/Upsert). This invalid document leads to fail for every subsequent read from table, as most of properties in document are BsonRequired.
My fix will ensure that either silo subdocument exists, and change is written, or not, and change is ignored.