Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2733

Make dfs_test.tmp schema location on local fs exclusive to test JVM fork.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.9.0
    • Component/s: Tools, Build & Test
    • Labels:
      None

      Description

      Currently dfs_test.tmp workspace location on local filesystem is hardcoded to /tmp/drilltest. If a test creates a view or new table, it is created under this location. Problem is when two or more test forks are running in parallel, sharing the dfs_test.tmp workspace location causes synchronization issues.

      For example: TestViewSupport#view1 creates a view testView1 in workspace dfs_test.tmp. This causes a new view file under /tmp/drilltest directory. At this point parallel running test TestInfoSchema#showTables makes a call to list tables in dfs_test.tmp workspace. Show tables returns testView1 as one of the tables in dfs_test.tmp workspace which it is not expecting causing the TestInfoSchema#showTables to fail.

      Proposed solution is:
      When setting up Drill test cluster in BaseTestQuery (root class for most tests), modify workspace dfs_test.tmp location to point to a temp directory created using Files.createTempDir. If two or more processes call Files.createTempDir at the same time each one guarateed to get a exclusive directory as long as there are no more than 1000 calls per millisecond.

      For JDBC, we rely on property drillJDBCUnitTests in connection properties to setup exclusive directory for dfs_test.tmp workspace.

        Attachments

        1. DRILL-2733-1.patch
          52 kB
          Venki Korukanti

          Issue Links

            Activity

              People

              • Assignee:
                vkorukanti Venki Korukanti
                Reporter:
                vkorukanti Venki Korukanti
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: