update fails with updating an item, that contains only key attrs

Bug #1416112 reported by Andrii Ostapenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MagnetoDB
Fix Released
Medium
Andrii Ostapenko

Bug Description

While updating an item, that contains only key attributes we get 500 error

Server side:

  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/magnetodb/magnetodb/common/wsgi.py", line 244, in __call__
    action_result = self.execute_action(action, request, **action_args)
  File "/opt/stack/magnetodb/magnetodb/common/wsgi.py", line 258, in execute_action
    return self.dispatch(self.controller, action, request, **action_args)
  File "/opt/stack/magnetodb/magnetodb/common/wsgi.py", line 267, in dispatch
    return method(*args, **kwargs)
  File "/opt/stack/magnetodb/magnetodb/api/__init__.py", line 35, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/stack/magnetodb/magnetodb/common/probe.py", line 94, in wrapper
    return f(*args, **kwargs)
  File "/opt/stack/magnetodb/magnetodb/api/openstack/v1/data/update_item.py", line 84, in process_request
    expected_condition_map=expected_item_conditions)
  File "/opt/stack/magnetodb/magnetodb/storage/__init__.py", line 309, in update_item
    expected_condition_map
  File "/opt/stack/magnetodb/magnetodb/storage/manager/simple_impl.py", line 668, in update_item
    expected_condition_map
  File "/opt/stack/magnetodb/magnetodb/common/probe.py", line 94, in wrapper
    return f(*args, **kwargs)
  File "/opt/stack/magnetodb/magnetodb/storage/driver/cassandra/cassandra_with_custom_lsi_impl.py", line 918, in update_item
    if result[0]['[applied]']:
TypeError: 'NoneType' object has no attribute '__getitem__'

Changed in magnetodb:
assignee: nobody → Andrei V. Ostapenko (aostapenko)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnetodb (master)

Fix proposed to branch: master
Review: https://review.openstack.org/151394

Changed in magnetodb:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnetodb (master)

Reviewed: https://review.openstack.org/151394
Committed: https://git.openstack.org/cgit/stackforge/magnetodb/commit/?id=df39ad7eb000b24a6d93bbe902552a168fe72ae8
Submitter: Jenkins
Branch: master

commit df39ad7eb000b24a6d93bbe902552a168fe72ae8
Author: Andrei V. Ostapenko <email address hidden>
Date: Thu Jan 29 23:47:15 2015 +0200

    Fix bug with update item that contains only key attributes

    Closes-bug: #1416112
    Change-Id: Ice5a765b7cfe34942c5b74c0d4f98d414c5c9678

Changed in magnetodb:
status: In Progress → Fix Committed
Changed in magnetodb:
milestone: none → kilo-2
importance: Undecided → Medium
Changed in magnetodb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.