Uploaded image for project: 'Hue'
  1. Hue
  2. HUE-4631

[home] DB transaction failing because of atomic block on home page

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.10.0
    • Fix Version/s: 3.12.0
    • Component/s: docs
    • Labels:
      None
    • Target Version:
    • Sprint:
      Sept 6-23, 2016

      Description

      Pretty common when going on http://demo.gethue.com/, and we get a nice 500 on landing

      Aug 13, 5:24:19 PM	INFO	middleware	
      Redirecting to login page: /
      Aug 13, 5:24:19 PM	INFO	access	
      10.149.111.204 -anon- - "GET / HTTP/1.1" -- login redirection
      Aug 13, 5:24:19 PM	INFO	decorators	
      AXES: Calling decorated function: dt_login
      Aug 13, 5:24:19 PM	INFO	backend	
      Materializing user tgjso77 in the database
      Aug 13, 5:24:19 PM	INFO	connectionpool	
      Resetting dropped connection: ec2-54-145-19-114.compute-1.amazonaws.com
      Aug 13, 5:24:20 PM	INFO	access	
      10.149.111.204 tgjso77 - "GET / HTTP/1.1"
      Aug 13, 5:24:20 PM	INFO	models	
      Successfully created home directory for user: tgjso77
      Aug 13, 5:24:20 PM	INFO	models	
      Successfully created trash directory for user: tgjso77
      Aug 13, 5:24:20 PM	INFO	models	
      Moved 0 documents to home directory for user: tgjso77
      Aug 13, 5:24:20 PM	INFO	access	
      10.149.111.204 tgjso77 - "GET / HTTP/1.1"
      Aug 13, 5:24:20 PM	INFO	models	
      Successfully created home directory for user: tgjso77
      Aug 13, 5:24:20 PM	INFO	models	
      Successfully created trash directory for user: tgjso77
      Aug 13, 5:24:20 PM	INFO	models	
      Moved 0 documents to home directory for user: tgjso77
      Aug 13, 5:24:20 PM	INFO	decorators	
      AXES: Calling decorated function: dt_login
      Aug 13, 5:24:20 PM	INFO	decorators	
      args: (True,)
      Aug 13, 5:24:20 PM	WARNING	views	
      Failed to convert and import documents: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.
      Aug 13, 5:24:20 PM	INFO	middleware	
      Processing exception: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.: Traceback (most recent call last):
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
          response = wrapped_callback(request, *callback_args, **callback_kwargs)
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py", line 371, in inner
          return func(*args, **kwargs)
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/desktop/core/src/desktop/views.py", line 306, in index
          return home2(request)
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/desktop/core/src/desktop/views.py", line 87, in home2
          apps = appmanager.get_apps_dict(request.user)
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/desktop/core/src/desktop/appmanager.py", line 203, in get_apps_dict
          apps = get_apps(user)
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/desktop/core/src/desktop/appmanager.py", line 199, in get_apps
          return filter(lambda app: user.has_hue_permission(action="access", app=app.display_name), DESKTOP_APPS)
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/desktop/core/src/desktop/appmanager.py", line 199, in <lambda>
          return filter(lambda app: user.has_hue_permission(action="access", app=app.display_name), DESKTOP_APPS)
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/desktop/core/src/desktop/auth/backend.py", line 108, in has_hue_permission
          return self._get_profile().has_hue_permission(action=action, app=app)
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/apps/useradmin/src/useradmin/models.py", line 119, in has_hue_permission
          if self.user.is_superuser:
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/fields/related.py", line 320, in __get__
          rel_obj = qs.get()
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 304, in get
          num = len(clone)
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 77, in __len__
          self._fetch_all()
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 857, in _fetch_all
          self._result_cache = list(self.iterator())
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 220, in iterator
          for row in compiler.results_iter():
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 713, in results_iter
          for rows in self.execute_sql(MULTI):
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 786, in execute_sql
          cursor.execute(sql, params)
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/util.py", line 47, in execute
          self.db.validate_no_broken_transaction()
        File "/opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.42/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 372, in validate_no_broken_transaction
          "An error occurred in the current transaction. You can't "
      TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.
      

        Attachments

          Activity

            People

            • Assignee:
              jennykim Jenny Kim
              Reporter:
              romain Romain Rigaux
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: