No error on attribute name length > 255

Bug #1298633 reported by Andrii Ostapenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MagnetoDB
Fix Released
Low
Nuno Santos

Bug Description

We expect that key attributes name length should be less than 255. However we can create table with key attr name length 256

2014-03-27 21:23:07,910 Request: POST http://localhost:8480/v1/default_tenant/data/tables
2014-03-27 21:23:07,910 Request Headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}
2014-03-27 21:23:07,910 Request Body: {"key_schema": [{"key_type": "HASH", "attribute_name": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}, {"key_type": "RANGE", "attribute_name": "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"}], "table_name": "testtempest1703684623", "attribute_definitions": [{"attribute_type": "S", "attribute_name": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}, {"attribute_type": "S", "attribute_name": "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"}]}
2014-03-27 21:23:09,311 Response Status: 200
2014-03-27 21:23:09,312 Response Headers: {'date': 'Thu, 27 Mar 2014 21:23:09 GMT', 'content-length': '1622', 'content-type': 'application/json'}
2014-03-27 21:23:09,312 Response Body: {"table_description": {"key_schema": [{"key_type": "HASH", "attribute_name": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}, {"key_type": "RANGE", "attribute_name": "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"}], "creation_date_time": 0, "links": [{"href": "http://localhost:8480/v1/default_tenant/data/tables/testtempest1703684623", "rel": "self"}, {"href": "http://localhost:8480/v1/default_tenant/data/tables/testtempest1703684623", "rel": "bookmark"}], "table_name": "testtempest1703684623", "table_size_bytes": 0, "table_status": "ACTIVE", "attribute_definitions": [{"attribute_type": "S", "attribute_name": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}, {"attribute_type": "S", "attribute_name": "ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"}], "item_count": 0}}

Changed in magnetodb:
importance: Undecided → Low
milestone: none → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnetodb (master)

Change abandoned by Nuno Santos (<email address hidden>) on branch: master
Review: https://review.openstack.org/125445

Changed in magnetodb:
milestone: next → none
Nuno Santos (nunosantos)
Changed in magnetodb:
assignee: nobody → Nuno Santos (nunosantos)
Changed in magnetodb:
milestone: none → kilo-1
tags: added: data-api validation
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnetodb (master)

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

commit 2e2125b409a31c30f1edd4c70c3aa3c60c617006
Author: Nuno Santos <email address hidden>
Date: Tue Oct 28 15:41:57 2014 -0400

    Additional validation; UUIDs as internal table names

    Restrict keyspace, index, table, and attribute names to valid characters,
    and minimum and maximum lengths as per
    http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html

    Use UUIDs as internal table / column family names in Cassandra
    implementation, to deal with different length limits and valid characters.

    Closes-Bug: #1308528
    Closes-Bug: #1271576
    Closes-Bug: #1298588
    Closes-Bug: #1298633

    Implements blueprint cassandra-uuid-internal-names

    Change-Id: I47ea3dd15c6bf4b4946f626734f4d6e45375a48b

Changed in magnetodb:
status: New → 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.