Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed DDataShardCoordinator NullReferenceException #6892

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Aug 24, 2023

Changes

This code was not handling null checks appropriately - enabled nullability for both shard coordinators and found the problem.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

@Aaronontheweb
Copy link
Member Author

Couldn't get Verify to work locally - I have no idea why

@@ -405,7 +408,7 @@ bool Receive(object message)
return true;

case RememberEntitiesCoordinatorStore.UpdateDone m:
if (!shardId.Contains(m.ShardId))
if (shardId != null && !shardId.Equals(m.ShardId))
Copy link
Member Author

Choose a reason for hiding this comment

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

These checks are the key bug fixes - enabling nullability made them easy to spot.

Copy link
Contributor

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

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

LGTM

@Arkatufus Arkatufus enabled auto-merge (squash) August 24, 2023 16:36
@Arkatufus Arkatufus merged commit 0c49fdb into akkadotnet:dev Aug 24, 2023
12 checks passed
@Aaronontheweb Aaronontheweb deleted the fix-DDataShardCoordinator-NRE branch August 25, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants