-
Notifications
You must be signed in to change notification settings - Fork 2k
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
IndexOutOfRangeException in StringEncodedWriteVector.FlipBit #2774
Comments
I hope @sebastianburckhardt knows what might be going on here. |
The public string ClusterId
{
get { return GlobalConfig.HasMultiClusterNetwork ? GlobalConfig.ClusterId : GlobalConfig.DeploymentId; }
} . Maybe your configuration is not setting the DeploymentId? (Regardless, we obviously need a better error message). Thanks for looking into this. |
I am encountering this problem during development where I run a single silo essentially configured as described in the Local Development section of the Typical Configurations documentation page.
|
Yes, as a workaround, try to set the DeploymentId to something other than null or empty. I don't think it matters what you pick, e.g. "A". We will fix this so the code to automatically pick a default if DeploymentId is null or empty. |
Fixed via #2786. |
I have tried to upgrade my project from 1.3.1 to 1.4.0. However, I'm currently having problems with
IndexOutOfRangeException
being thrown byStringEncodedWriteVector.FlipBit
. This happens because bothwriteVector
andReplica
are empty strings thuspos = writeVector.IndexOf(Replica)
becomes 0 and thenwriteVector[pos - 1]
throws the exception.Eventually, the exception is caught in
PrimaryBasedLogViewAdaptor.UpdatePrimary
where the comment states the following:Obviously, there is something wrong in my code. However, it seems that whatever is wrong triggers some unexpected errors in Orleans that are hard to understand.
While I came here to report the unexpected way that
FlipBit
can fail when passed two empty strings any suggestions why this happens in the first place are welcome. I have modified my code based on the updated documentation on event sourced grains and it is not obvious to me what I'm doing wrong. One thing that is a bit special is that this error happens during silo startup where a bootstrap provider calls some event sourced grains.The text was updated successfully, but these errors were encountered: