hsato03 opened a new pull request, #8832:
URL: https://github.com/apache/cloudstack/pull/8832

   ### Description
   
   During the snapshot process of a scheduled snapshot, if the time to create 
the snapshot is greater than the value of the `job.expire.minutes` global 
setting, both `async_job` and `snapshot_schedule` records are removed from the 
database due to the `ON DELETE CASCADE` constraint present in the 
`async_job_id` foreign key of the `snapshot_schedule` table. This causes 
snapshot scheduling to stop working as the record of the last 
`snapshot_schedule` must exist to schedule the next one.
   
   Therefore, the `async_job_id` constraint was removed so that an expired job 
does not trigger the removal of the scheduled snapshot.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] build/CI
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   I followed the same steps from `How did you try to break this feature and 
the system with this change?` and verified that the `async_job` was removed but 
the `snapshot_schedule` was not and the recurring snapshots were working.
   
   #### How did you try to break this feature and the system with this change?
   
   1. Change the `job.expire.minutes` global setting value to `1`;
   2. Create a recurring snapshot for a volume;
   3. Wait until the snapshot starts and `async_job` is removed;
   4. The `snapshot_schedule` is also removed and the next snapshot is not 
scheduled.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to