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

[Python] Avoid Reference Cycles in pyarrow.parquet

    XMLWordPrintableJSON

Details

    Description

      Reference cycles appear in two places inside pyarrow.parquet which causes these objects to have much longer lifetimes than necessary:

       

      _build_nested_path has a reference cycle because the closured function refers to the parent cell which also refers to the closured function again (objgraph shown in attachment)

      open_dataset_file is partialed with self inside the ParquetFile class (objgraph shown in attachment).

      Attachments

        1. cycle1_build_nested_path.PNG
          30 kB
          Aaron Opfer
        2. cycle2_open_dataset.PNG
          51 kB
          Aaron Opfer

        Issue Links

          Activity

            People

              AaronOpferCTC Aaron Opfer
              AaronOpferCTC Aaron Opfer
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 40m
                  2h 40m