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

Document truncation of Journal read count #6

Open
AndersSahlin opened this issue Jun 17, 2015 · 2 comments
Open

Document truncation of Journal read count #6

AndersSahlin opened this issue Jun 17, 2015 · 2 comments
Labels

Comments

@AndersSahlin
Copy link
Contributor

The read count is truncated from Long to Int. Document this behavior.

In ServiceFabricPersistence.ServiceFabricEventJournal.GetMessagesAsync

int m = max > int.MaxValue ? int.MaxValue : (int)max;

@rogeralsing
Copy link
Contributor

This one is a bit ugly.
The JVM Api is designed around long values for journal sequence numbers, which is all fine.
In our specific implementation here, there are two issues;

  1. We use Linq to objects to filter the journal, l2o uses integers for its methods, thus, the value needs to be truncated.
  2. We are probably not going to ever be able to deserialize more than int.Max entries from servicefabric. as that would probably take a couple of days and a bizarre amount of memory to deserialize such object.

So, are we OK with the long to int truncation?

cc. @clca

@clca
Copy link
Contributor

clca commented Jun 19, 2015

It is probably a corner case considering that it would assume that an Actor would need 100s GB of storage for its state. We may want to catch this case at the plug-in level and return some sort of error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants