[GODRIVER-2677] Investigate excess memory usage that may be due to pooling Created: 07/Dec/22 Updated: 28/Oct/23 Resolved: 15/May/23 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | 1.11.0 |
| Fix Version/s: | 1.12.0, 1.11.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Benji Rewis (Inactive) | Assignee: | Qingyang Hu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Documentation Changes: | Not Needed | ||||||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||||||||||
| Description |
|
Realm has reported increased memory usage from the driver after upgrading to v1.11.0 of the driver. At first glance, this seems to be related to the new memory pooling for operation execution introduced in Here are some provided memory profiles:
|
| Comments |
| Comment by Qingyang Hu [ 15/May/23 ] | ||
|
Hello harriklein@gmail.com, Thank you for using MongoDB Go Driver! Unfortunately, we don't expect external users to explicitly call the methods in the x package because they are subject to frequent changes. Therefore, we will prevent users from importing the x package in the v2.0 driver to minimize confusion (see We will close this ticket as it is. We apologize for the inconvenience. | ||
| Comment by Harri Klein [ 11/May/23 ] | ||
|
We have updated our mongo driver version from 1.11.2 and we have a problem with one of the changes applied in this issue. It seems that is a huge improvement but maybe it generates a small issue in a secondary function. We are using the function CompressPlayload to reduce some huge fields and DecompressPayload decode when we need of this field. The change applied in the link bellow force to send the length of the umcompressed field. If we don’t send it the value is 0 and with io.ReadFull nothing is read. In the case to use to compress/decompress fields is not possible to know the length uncompressed (unless we store in another field) Is it possible to change back this part of code to read all decoded buffer at least when the opts.UncompressedSize = 0? Otherwise we write our own func. Many thanks.
| ||
| Comment by Githook User [ 17/Mar/23 ] | ||
|
Author: {'name': 'Qingyang Hu', 'email': '103950869+qingyang-hu@users.noreply.github.com', 'username': 'qingyang-hu'}Message: | ||
| Comment by Githook User [ 23/Feb/23 ] | ||
|
Author: {'name': 'Qingyang Hu', 'email': '103950869+qingyang-hu@users.noreply.github.com', 'username': 'qingyang-hu'}Message: |