-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/5806/#review8930
-----------------------------------------------------------



server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
<https://reviews.apache.org/r/5806/#comment18977>

    Please use a finally() to do the decrement



server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
<https://reviews.apache.org/r/5806/#comment18978>

    Please use a finally() to do the decrement



server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
<https://reviews.apache.org/r/5806/#comment18979>

    Please use the finally above to do the decrement
    



server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
<https://reviews.apache.org/r/5806/#comment18980>

    Again this is boilerplate code.



server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
<https://reviews.apache.org/r/5806/#comment18981>

    If you go inside the function checkResourceLimit and incrementResourceCount 
you will see that they are synchronized by locking the rows so you don't 
require this.



server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
<https://reviews.apache.org/r/5806/#comment18982>

    Please use a finally() to do the decrement


- Nitin Mehta


On July 6, 2012, 12:43 p.m., deepti dohare wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/5806/
> -----------------------------------------------------------
> 
> (Updated July 6, 2012, 12:43 p.m.)
> 
> 
> Review request for cloudstack.
> 
> 
> Description
> -------
> 
> Change:
> 1. Before creating the snapshot, we synchronized checkResourcelimit to allow 
> the users to create the snapshot and increment the resource count.
> 2. Depending on the failure of snapshot creation/ backup, we are decrementing 
> the resource count.
> 
> 
> This addresses bug CS-15430.
> 
> 
> Diffs
> -----
> 
>   server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b97a7d7 
> 
> Diff: https://reviews.apache.org/r/5806/diff/
> 
> 
> Testing
> -------
> 
> Steps to verify:
> 1.Login as admin, set snapshot limit '3' for a user account
> 2.login as user, create a VM1 with data volume
> 3.trigger 3 create snapshot command from the above data volume, succeeded
> 4.create one more snapshot, failed, "maximum limit exceeded for account user"
> 
> 
> Thanks,
> 
> deepti dohare
> 
>

Reply via email to