hermanschaaf opened a new pull request, #35215:
URL: https://github.com/apache/arrow/pull/35215

   This adds support for printing the full call stack when a leak is reported 
by the checked memory allocator. An `ARROW_CHECKED_MAX_RETAINED_FRAMES` 
environment variable controls how many frames are retained. To keep this 
completely backwards-compatible, the default right now is zero. In this case, 
the reported error is exactly the same as before. When a higher value is given 
though, a longer call stack is printed. For example:
   
   Before (same as `ARROW_CHECKED_MAX_RETAINED_FRAMES=0`):
   
   ```
   checked_allocator.go:160: LEAK of 64 bytes FROM 
github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).newData line 2396
   ```
   
   After (with `ARROW_CHECKED_MAX_RETAINED_FRAMES=100`):
   
   ```
   checked_allocator.go:160: LEAK of 64 bytes FROM 
github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).newData line 2396
        
github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).NewTimestampArray
 line 2386
        github.com/apache/arrow/go/v12/arrow/array.(*TimestampBuilder).NewArray 
line 2380
        github.com/apache/arrow/go/v12/arrow/array.(*RecordBuilder).NewRecord 
line 346
        github.com/cloudquery/plugin-sdk/v2/testdata.GenTestData line 243
        github.com/cloudquery/plugin-sdk/v2/plugins/destination.testMigration 
line 53
        
github.com/cloudquery/plugin-sdk/v2/plugins/destination.(*PluginTestSuite).destinationPluginTestMigrate.func5
 line 239
        testing.tRunner line 1576
        runtime.goexit line 1172
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to