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

Proposed Fix for Issue #41 #73

Merged
merged 2 commits into from
Jun 23, 2016
Merged

Proposed Fix for Issue #41 #73

merged 2 commits into from
Jun 23, 2016

Conversation

stewart-r
Copy link
Contributor

@stewart-r stewart-r commented Jun 16, 2016

I believe this fixes #41 .

Instead of simply using a batch size of 100 we now check the maximum possible size of the entity type we are given and calculate the batch size from there by dividing the max batch size by the max size of an entity then using the min of that result and 100.

in order to calculate the max size of an entity I used the table here

I did have a concern that as I am measuring only the properties on a DynamicTableEntity that later elements in the array may have a different set of properties but, on reflection, I don't think this is possible. I think it's impossible because, as it is being called from inside the Insert function, the DynamicTableEntity will have just been mapped from the generated table entity?

@isaacabraham
Copy link
Collaborator

Thanks for this - I was dreading doing it :-) I'm a bit busy over the next couple of days so apologies - but I will get around to reviewing this (and then no doubt accepting the PR).

@stewart-r
Copy link
Contributor Author

Thanks Isaac.

No need to rush and certainly no need apologise for being busy! :-)

@isaacabraham isaacabraham merged commit 0f52789 into fsprojects:master Jun 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit batches to 4mb in size
2 participants