Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-1396

Avoid unnecessary ResultSpooler.bin files creation/deletion every time SpoolingResultIterator is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.3.0, 3.3.0, 4.2.1
    • None
    • None

    Description

      In SpoolingResultIterator.java, we have following code:

                  tempFile = File.createTempFile("ResultSpooler",".bin", new File(spoolDirectory));
                  DeferredFileOutputStream spoolTo = new DeferredFileOutputStream(size, tempFile) {
      

      Basically we pre-create spill file even we don't reach memory threshold and later we delete the same file if it's not needed in finally block. We can remove these unnecessary file creation & deletion altogether.

      Attachments

        1. PHOENIX-1396.patch
          3 kB
          Jeffrey Zhong
        2. PHOENIX-1396-v2.patch
          3 kB
          Jeffrey Zhong

        Activity

          People

            jeffreyz Jeffrey Zhong
            jeffreyz Jeffrey Zhong
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: