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
7 changes: 6 additions & 1 deletion src/Cassandra/Orleans.Clustering.Cassandra/OrleansQueries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,10 @@ UPDATE membership
IF
version = :expected_version;
""",
// This is ignored because we're creating a LWT
MembershipWriteConsistencyLevel);

return _updateIAmAliveWithTtlPreparedStatement.Bind(new
BoundStatement updateIAmAliveTimeWithTtL = _updateIAmAliveWithTtlPreparedStatement.Bind(new
{
partition_key = clusterIdentifier,
// The same version still needs to be written, to update its cell-level TTL
Expand All @@ -217,6 +218,10 @@ UPDATE membership
// But we still check that the version was the same during the update so we don't stomp on another update
expected_version = existingVersion.Version,
});

// To improve performance, we allow IAmAlive updates to be LocalSerial
updateIAmAliveTimeWithTtL.SetSerialConsistencyLevel(ConsistencyLevel.LocalSerial);
return updateIAmAliveTimeWithTtL;
}

public async ValueTask<IStatement> DeleteMembershipEntry(string clusterIdentifier, MembershipEntry membershipEntry)
Expand Down
Loading