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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: