[JIRA] Resolved: (SSPCPP-507) Insert record failed Violation of PRIMARY KEY constraint with ODBC plugin

Scott Cantor (JIRA) noreply at shibboleth.net
Mon Oct 8 23:13:22 EDT 2012


     [ https://issues.shibboleth.net/jira/browse/SSPCPP-507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Cantor resolved SSPCPP-507.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.5.1

http://svn.shibboleth.net/view/cpp-sp?rev=3777&view=rev

I don't have the time to try this with Azure, but I'm going to try and reproduce the read/update/read/update sequence when I test this patch.

All update retry loops are now bounded with 10 attempts. In this case, the retry failure will not be fatal to most use cases, only an actual SAML logout might be affected.

I also added and fixed various logging in the plugin to collect more information in the event it acts up like this.

Finally, the code detects version overflow now, and supports both smallint and int types in the version columns by keying off the minor version in the VERSION table set to 1 (or greater). Switching to int will be the suggested DDL once this is released.

> Insert record failed Violation of PRIMARY KEY constraint with ODBC plugin
> -------------------------------------------------------------------------
>
>                 Key: SSPCPP-507
>                 URL: https://issues.shibboleth.net/jira/browse/SSPCPP-507
>             Project: Shibboleth SP - C++
>          Issue Type: Bug
>      Security Level: Standard(Standard bug, may impact functionality but does not represent a security vulnerability ) 
>          Components: Session Cache
>    Affects Versions: 2.5.0
>         Environment: Windows 2008 R2 on Azure.
>            Reporter: pbrears at idp.protectnetwork.org
>            Assignee: Scott Cantor
>              Labels: Session
>             Fix For: 2.5.1
>
>         Attachments: shiblogs.zip
>
>
> Using two servers with the odbc connection plugin for the storage service you can occasionally get 'insert record failed' 'Violation of PRIMARY KEY constraint' logged
> We're using "SQL Server Native Client 10.0" driver to access SQL azure for the db
> There are two servers in the non sticky load balancer. It's likely that /SAML/POST and /Secure are landing on different boxes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the commits mailing list