Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1293

There were logic errors in create_rangerdb_user and grant_xa_db_user function.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.7.0
    • admin
    • Patch

    Description

      There were logic errors in create_rangerdb_user and grant_xa_db_user function.
      The reason for the error is that the hosts_arr variable was set ["%", "localhost"] as default value at the beginning. The hosts_arr variable will include two localhost values if self.host equal to localhost. As a result, the code block will be executed repeatedly, the performance of the program will be reduced. The error code is following:
      hosts_arr =["%", "localhost"]
      hosts_arr.append(self.host)
      for host in hosts_arr:
      business logic code block
      From the above code logic we can be seen that the business logic code block will be repeated twice when the db_host attribute is set to localhost in install.properties.

      Attachments

        Activity

          People

            zhangqiang2 Qiang Zhang
            zhangqiang2 Qiang Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: