You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2017/05/19 20:48:04 UTC

[jira] [Resolved] (CXF-7374) Concurrent calls to refreshAccessToken() fails with SQL constraint violation

     [ https://issues.apache.org/jira/browse/CXF-7374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-7374.
-----------------------------------
    Resolution: Fixed
      Assignee: Sergey Beryozkin

I've re-enabled the test - the expected value must be equal to 2. CXF-7376 will deal with it further - there must be an option to have only a single AT being around at a time

> Concurrent calls to refreshAccessToken() fails with SQL constraint violation
> ----------------------------------------------------------------------------
>
>                 Key: CXF-7374
>                 URL: https://issues.apache.org/jira/browse/CXF-7374
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS Security
>    Affects Versions: 3.2.0
>            Reporter: Viacheslav Gagara
>            Assignee: Sergey Beryozkin
>             Fix For: 3.2.0, 3.1.12
>
>
> When recycleRefreshTokens=false concurrent calls to refreshAccessToken() cause SQLException (2 accessTokens are created simultaneously and added to RefreshToken#accessTokens with the same index from different threads) 
> {code}
> Batch entry 0 insert into RefreshToken_accessTokens (RefreshToken_tokenKey, accessTokens_ORDER, accessTokens) values ('fced31aaba6723ecc5956721e8f029f1', 1, '8c559d9f738f33a1b866e7172c9e5644') was aborted: ERROR: duplicate key value violates unique constraint "refreshtoken_accesstokens_pkey"
>   Detail: Key (refreshtoken_tokenkey, accesstokens_order)=(fced31aaba6723ecc5956721e8f029f1, 1) already exists. 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)