-
Notifications
You must be signed in to change notification settings - Fork 197
Read large values stress test - nested reference buffer bug #201 #165 #204
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
Conversation
Hi @liutec, Sorry for the late reply. I included your improvement to remove the recursion in #206 together with the fix for releasing the reference of view. Your fix to change to Also this part of the code also need to compile to C, therefore I started a PR to address some changes to Cython code. Would you also try out the changes in #206 and see if that also works for you? I failed to make client throw OOM before server. Also I change a bit in your Finally if it is okay, would you mind sign our CLA so that we have the right to compile and merge your code to our codebase? Thanks again for helping us on this issue! |
Hello @zhenlineo, thank you, I tested the changes from #206 and the issue is gone. Sorry about the mess, I'm not a big contributor on GitHub and I still have a lot to learn about the process (and Python). I appreciate your patience. I signed the CLA as per the instructions. As for I just noticed the junk code I've committed: data_size = self._end - self._start
if data_size > new_data_size:
new_end = self._end + new_data_size
self._data[self._end:new_end] = bytearray(data_size) I was trying to pre-calculate the size for From what I saw here, bytearrays are stored in contiguous blocks of memory and even though Python tries to overallocate for small changes this still implies a huge overhead for the allocs & copy required for large data. Resizing |
@liutec You are most welcome to improve the fix. I am mostly trying to get in this fix first and send a patch out so that we could first clear people's problem. Cheers, |
@zhenlineo |
@liutec Thanks very much. I got your CLA and merge the other PR with your commits. You are most welcome to improve the code. Zhen |
Hi @liutec, This PR have some conflicts with the new 1.5 code as both you and me modified the same part of code. If you would like to continue working on this PR for improving buffer usage, then it might be easier to create a new PR on the top of the new 1.5 branch? The PR #206 includes your first few commits, but I modified a bit based on your feedback. So thanks again for contribute to this driver! And if you issue new PRs, our integrated build server will recognize you as a old friend. So you are most welcome to contribute more if you like. I am closing this PR now as I am just tidying things up around before Christmas. Cheers, |
This test should fail because a reference to the previous _view is kept in ChunkedInputBuffer.frame_message
Fix to follow.