CurtHagenlocher opened a new pull request, #526:
URL: https://github.com/apache/arrow-dotnet/pull/526

   ## What's Changed
   
   When these operations failed partway through, buffers they had already 
created were dropped without being disposed, leaving them to a finalizer. Each 
now releases what it created before rethrowing.
   
   - Concatenation: the visitor records every buffer, reference and nested 
result it creates until it becomes part of the result, and releases them if 
concatenation fails. Fixed-width and variable-length binary arrays leaked their 
validity (and offsets) buffers when a later buffer failed, for example on an 
input whose buffer is too short.
   - Reading: `CreateArrowObjectFromMessage` owns the message body and releases 
it unless the result refers to it, and the stream readers release it if reading 
it fails (for example on a truncated stream). A field that fails partway 
through, such as on a corrupt compressed buffer, releases the buffers and 
children already read, as do the fields before it. Dictionaries are left alone: 
they belong to the reader and are shared with batches already read. Failed 
decompression releases its output.
   - Writing: the batch builder's `Dispose` releases buffers not yet written, 
so a write that fails partway through (for example on a broken connection) no 
longer leaks the rest, and preparing a batch releases what it allocated if it 
throws.
   
   The writer and reader changes are adapted from the draft allocator work in 
#504.


-- 
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