Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-6898

[Java] Fix potential memory leak in ArrowWriter and several test classes

    XMLWordPrintableJSON

    Details

      Description

      ARROW-6040 fixed the problem that dictionary entries are required in IPC streams even when empty, which only writes dictionaries when there are at least one batch. In this way, if we write empty stream and invoke ArrowWriter#close, the dictionaries are not closed leading to memory leak (they are closed after the write operation), and it’s really hard to debug, this problem was found by TestArrowReaderWriter#testEmptyStreamInStreamingIPC when I tried to close allocator after the test. 

       

      Besides, there are several test classes have potential memory leak without closing allocator/vector/buf etc.

        Attachments

          Activity

            People

            • Assignee:
              tianchen92 Ji Liu
              Reporter:
              tianchen92 Ji Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 10m
                2h 10m