Create table after failure

Bug #1302495 reported by Alexander Chudnovets
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MagnetoDB
Fix Released
High
Dmitriy Ukhlov

Bug Description

If there is some errors during create table process, next request with same table name fails.

Steps to reproduce:
1. Try to create table in nonexistent keyspace (bug https://bugs.launchpad.net/magnetodb/+bug/1295077)
2. Create keyspace
3. Try to create the table with the same name

Expected response: 200 with table info
Real response:
{
    "explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.",
    "code": 400,
    "error": {
        "message": "Table 'Thread' already exists",
        "traceback": null,
        "type": "TableAlreadyExistsException"
    },
    "title": "Bad Request"
}

And the table with specified name is absent in Cassandra.

Revision history for this message
Alexander Chudnovets (achudnovets) wrote :

I believe it may be connected with new table schema: some info about new tables is inserted in the magnetodb.table_info table. If create table command fails the record about failed table remains in the magnetodb.table_info table.

Changed in magnetodb:
importance: Undecided → Low
milestone: none → 2.0.3
Changed in magnetodb:
milestone: 2.0.3 → 2.0.4
Changed in magnetodb:
importance: Low → High
milestone: 2.0.4 → 2.0.5
Dmitriy Ukhlov (dukhlov)
Changed in magnetodb:
assignee: nobody → Dmitriy Ukhlov (dukhlov)
Dmitriy Ukhlov (dukhlov)
Changed in magnetodb:
status: New → In Progress
status: In Progress → New
Revision history for this message
Dmitriy Ukhlov (dukhlov) wrote :

Sorry, but now we don't have recovery after fail functionality. If we try to get access to the keyspace but it isn't exist, it means that magnetodb is not configured properly. I guess now ew can only provide validation - is this tenant configured for magnetodb usage or not and reject request if it isn't

Dmitriy Ukhlov (dukhlov)
Changed in magnetodb:
status: New → In Progress
Changed in magnetodb:
milestone: 2.0.5 → 2.0.6
Revision history for this message
Dmitriy Ukhlov (dukhlov) wrote :

now we have merged patch for automatic creation of keyspace if it is needed so this problem is not actual

Changed in magnetodb:
status: In Progress → Won't Fix
status: Won't Fix → Fix Committed
Changed in magnetodb:
milestone: 2.0.6 → juno-3
Changed in magnetodb:
status: Fix Committed → Won't Fix
status: Won't Fix → 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.