aws-sdk-cpp
aws-sdk-cpp copied to clipboard
Question about m_bufferManager setup in TransferManager ctor and dtor
Describe the issue
Hello, I'm trying to understand the TransferManager code and found something that I'm not sure about. Here's my question.
In the ctor it's trying to call PutResource for the m_bufferManager. And in the dtor, it's trying to ShutdownAndWait then delete all the buffer in m_bufferManager. Let's say we have the default m_transferConfig.transferBufferMaxHeapSize which is 50MB, and we set m_transferConfig.bufferSize to be 20MB. In this example, the ctor will call PutResource three times basing on the code here. But in the dtor here, the resourceCount it calculates should be 2: static_cast<size_t>(m_transferConfig.transferBufferMaxHeapSize / m_transferConfig.bufferSize). There's a difference between the resourceCount and the actual resource size. The ShutdownAndWait code is here. If I understand correctly, buffers may not be freed completely in this case.
Maybe I miss something and it's actually a silly question. Please help me figure out if there's anything wrong. Thanks for the help!
Steps to Reproduce
No response
Current behavior
No response
AWS CPP SDK version used
latest
compiler and version used
7.5.0
Operating System and version
Ubuntu 18.04
Hi @junlan28 , Hmmm... I think you might be right there, let me do some digging and figure out what is going on, but it might be a kind of "if you changed it, you are expected to know" things. Anyways, thanks for bringing this up to us
@KaibaLopez hello, thanks for your reply! I'm wondering if there's any further updates?
Greetings! Sorry to say but this is a very old issue that is probably not getting as much attention as it deservers. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.