Ask Your Question
0

Are there any handles of DB transaction of current version Quantum?

asked 2012-07-06 09:31:08 -0500

guestly gravatar image

Currently, run an instance for example, will write the DB several times, if there aren't DB transactions between these DB writings, there may be many problems after that. So are there any handlings or plans to use DB transaction to avoid such problems?

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2012-07-10 01:13:12 -0500

guestly gravatar image

Thanks Salvatore Orlando, that solved my question.

edit flag offensive delete link more
0

answered 2012-07-09 17:06:40 -0500

salvatore-orlando gravatar image

Havent,

Within a single API operation, we definitely want to respect atomicity, as well as all the ACID properties, and that is what we are striving for. If you reckon that there are operations for which the behavior is not atomic please file a bug for them as that would be something that definitely needs to be fixed, as stated in my previous answer.

Thanks, Salvatore

On 8 July 2012 18:21, Havent question202407@answers.launchpad.net wrote:

Question #202407 on quantum changed: https://answers.launchpad.net/quantum/+question/202407 (https://answers.launchpad.net/quantum...)

Status: Answered => Open

Havent is still having a problem: Thanks Salvatore, Batch API create/delete as the bug report says is one aspect of the problem of integrity of data. But I mentioned in my question is just one API call. It may be involved serial DB APIs call, and I mean these DB APIs call should act atomicly.


You received this question notification because you are a member of Netstack Core Developers, which is an answer contact for quantum.

edit flag offensive delete link more
0

answered 2012-07-09 01:16:27 -0500

guestly gravatar image

Thanks Salvatore, Batch API create/delete as the bug report says is one aspect of the problem of integrity of data. But I mentioned in my question is just one API call. It may be involved serial DB APIs call, and I mean these DB APIs call should act atomicly.

edit flag offensive delete link more
0

answered 2012-07-06 09:49:47 -0500

salvatore-orlando gravatar image

Hi Havent,

I am not sure if I got your question right. I will try to answer anyway!

In Quantum we strive to ensure that each API operation are ACID wrt the DB. Should there be operations which do not respect these properties, Atomicity in particular, that would be a bug, and should definitely be raised.

For more convoluted tasks involving several Quantum operations, such as spawning an instance, I am not sure whether an approach based on DB transactions would be actually feasible - and if yes, I am not convinced this is the kind of behaviour one would expect from a REST API. As you might already have seen the allocate_for_instance call in nova.network.api.quantumv2 has some code for ensuring instance creation is performed in an atomic and consistent way. I agree this is not the way one would like to do this, and we'll certainly improve it for Folsom-3.

Please have a look at this bug report, and let me know if this is kind of thing you would be expecting from the tasks performing several operations on the API: https://bugs.launchpad.net/quantum/+bug/1020639 (https://bugs.launchpad.net/quantum/+b...)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-07-06 09:31:08 -0500

Seen: 5 times

Last updated: Jul 10 '12