Bug 749467

Summary: Failed Content Spec increments Content Spec ID
Product: [Community] PressGang CCMS Reporter: Joshua Wulf <jwulf>
Component: CSProcessorAssignee: Ali Abbas <alabbas>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.xCC: jwulf, lcarlon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-04 10:18:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Joshua Wulf 2011-10-27 07:08:39 UTC
After three failed attempts... it succeeds, but with Content Spec ID 4??



Content Specification ID: 4
Revision: 5

[jwulf@gaura dumps]$ skynet pull --post -c 3
Skynet client version: 10.0
Loading configuration from /home/jwulf/.config/skynet.ini
Web Service at http://localhost:8080/ version: 10.0

INFO: No data was found for the specified ID!

Comment 1 Lee Newson 2011-10-28 00:38:47 UTC
That is a part of MySQL, it increments the AUTO_INCREMENT id outside of the transaction and only holds the lock until the end of the SQL statement.

Reference:
http://dev.mysql.com/doc/refman/5.1/en/innodb-auto-increment-handling.html

Comment 2 Ali Abbas 2011-10-28 02:18:08 UTC
This is fixed now, so we auto increment it our self inside the CSProcessor instead of using the database's AUTO_INCREMENT. It checks for the content spec Max ID then increments it by 1 once a valid content spec is processed.