Bug #81945 | API memory leaks after destructing a Ndb object with open NdbTransactions | ||
---|---|---|---|
Submitted: | 21 Jun 2016 8:52 | Modified: | 27 Jun 2016 16:35 |
Reporter: | Ole John Aske | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: NDB API | Severity: | S3 (Non-critical) |
Version: | 7.5.2 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[21 Jun 2016 8:52]
Ole John Aske
[27 Jun 2016 16:35]
Jon Stephens
Documented fix in the NDB 7.5.4 changelog as follows: NDB API objects are allocated in the context of an Ndb object, or of an NdbTransaction object which is itself owned by an Ndb object. When a given Ndb object is destroyed, all remaining NdbTransaction objects are terminated, and all NDB API objects related to this Ndb object should be released at this time as well. It was found, when there remained unclosed NdbTransaction objects when their parent Ndb object was destroyed, leaks of objects allocated from the NdbTransaction objects could occur. (However, the NdbTransaction objects themselves did not leak.) While it is advisable (and recommended) to close an NdbTransaction explicitly as soon as its lifetime ends, the destruction of the parent Ndb object should be sufficient to release whatever objects are dependent on it. Now in cases such as described previously, the Ndb destructor checks to ensure that all objects derived from a given Ndb instance are truly released. Closed.