No validation on table creation with set type hash key

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

Bug Description

Table creation with set type hash key fails on backend and gets CREATE_FAILURE status, however we are expecting that attempt of creation will fail on validation level

Request Body: {"key_schema": [{"key_type": "HASH", "attribute_name": "set"}], "table_name": "testtempest532783213", "attribute_definitions": [{"attribute_type": "SS", "attribute_name": "set"}]}
Response Status: 200
Response Headers: {'date': 'Wed, 08 Oct 2014 12:57:27 GMT', 'content-length': '560', 'content-type': 'application/json', 'connection': 'close, close'}
Response Body: {"table_description": {"key_schema": [{"key_type": "HASH", "attribute_name": "set"}], "creation_date_time": 0, "links": [{"href": "http://192.168.122.100:8480/v1/bca75afd0f3b47fc882f90a1c03f1bc4/data/tables/testtempest532783213", "rel": "self"}, {"href": "http://192.168.122.100:8480/v1/bca75afd0f3b47fc882f90a1c03f1bc4/data/tables/testtempest532783213", "rel": "bookmark"}], "table_name": "testtempest532783213", "table_size_bytes": 0, "table_status": "CREATING", "attribute_definitions": [{"attribute_type": "SS", "attribute_name": "set"}], "item_count": 0}}
}}}

Changed in magnetodb:
assignee: nobody → Charles Wang (charles-wang)
Chao Li (chao-li-0)
Changed in magnetodb:
assignee: Charles Wang (charles-wang) → Chao Li (chao-li-0)
Changed in magnetodb:
milestone: none → kilo-1
tags: added: data-api validation
Changed in magnetodb:
importance: Undecided → Medium
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/132871

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnetodb (master)

Change abandoned by Chao Li (<email address hidden>) on branch: master
Review: https://review.openstack.org/136059
Reason: I have created another patch for this bug before

Changed in magnetodb:
milestone: kilo-1 → kilo-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnetodb (master)

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

commit 82a1dac6eb8452fe6108fea9749a6b99aeb7becb
Author: Chao Li <email address hidden>
Date: Mon Dec 29 21:59:22 2014 +0000

    Add type validation to the primary hash and range key

    This change adds the type validation for the primary key, including
    both the hash and range keys, Since the primary hash and range keys
    only support scalar types, which are number, string and binary.

    Closes-Bug: #1378820

    Change-Id: I86bda5378208d340b4cb12d5c0ddb9b5bf2face1

Changed in magnetodb:
status: In Progress → Fix Committed
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.