Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4547

Fix ExecEnv singleton issues in tests

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Impala 2.8.0
    • Fix Version/s: Impala 2.9.0
    • Component/s: Backend
    • Labels:

      Description

      Some test suites create and destroy ExecEnv objects with every test case.

      However ExecEnv is meant to be used as a singleton, and the logic right now has the c'tor install the singleton pointer just once:

      if (exec_env_ == NULL) exec_env_ = this;

      So after TestEnv destroys its ExecEnv, the singleton pointer is invalid; any classes that use ExecEnv::GetInstance() aren't compatible with TestEnv usage.

      We should add ExecEnv::InstallNewSingleton() or similar to allow test environments to reset the global singleton.

        Activity

        Hide
        tarmstrong Tim Armstrong added a comment -

        This was fixed incidentally by another patch.

        Show
        tarmstrong Tim Armstrong added a comment - This was fixed incidentally by another patch.
        Hide
        jrussell John Russell added a comment -

        Is there a label or another component we could add to this JIRA for filtering purposes? (This seems like what I see as component = 'infrastructure' in some other JIRAs.)

        Show
        jrussell John Russell added a comment - Is there a label or another component we could add to this JIRA for filtering purposes? (This seems like what I see as component = 'infrastructure' in some other JIRAs.)

          People

          • Assignee:
            Unassigned
            Reporter:
            henryr Henry Robinson
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development