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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.3.0, 3.3.0, 4.2.1
    • Labels:
      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-v2.patch
          3 kB
          Jeffrey Zhong
        2. PHOENIX-1396.patch
          3 kB
          Jeffrey Zhong

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: