[ 
https://issues.apache.org/jira/browse/JCR-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13651679#comment-13651679
 ] 

Julian Reschke commented on JCR-3592:
-------------------------------------

Is this really about 2.5? If so, please try with the latest stable branch (2.6).
                
> Retry fails when updating stream
> --------------------------------
>
>                 Key: JCR-3592
>                 URL: https://issues.apache.org/jira/browse/JCR-3592
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.5
>            Reporter: Todd Pagni
>
> DbDataStore.addRecord executes a few update statements.   We are getting 
> deadlocks when the update statements are executed (different issue), which 
> cause the update statements to fail.  When the update fails, it should be 
> retried in RetryManager.doTry.  When the failure occurs due to the deadlock, 
> we do see a retry, but they retry fails for the (UPDATE DATASTORE SET DATA=? 
> WHERE ID=?) query because the stream has already been read. See error below: 
> com.microsoft.sqlserver.jdbc.SQLServerException: The stream value is not the 
> specified length. The specified length was 6,985, the actual length is 0.
>       at com.microsoft.sqlserver.jdbc.TDSWriter.error(IOBuffer.java:2224)
>       at 
> com.microsoft.sqlserver.jdbc.TDSWriter.writeStream(IOBuffer.java:2146)
>       at 
> com.microsoft.sqlserver.jdbc.TDSWriter.writeRPCInputStream(IOBuffer.java:2958)
>       at com.microsoft.sqlserver.jdbc.DTV$SendByRPCOp.execute(dtv.java:546)
>       at com.microsoft.sqlserver.jdbc.DTV.executeOp(dtv.java:749)
>       at com.microsoft.sqlserver.jdbc.DTV.sendByRPC(dtv.java:790)
>       at com.microsoft.sqlserver.jdbc.Parameter.sendByRPC(Parameter.java:645)
>       at 
> com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.sendParamsByRPC(SQLServerPreparedStatement.java:457)
>       at 
> com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doPrepExec(SQLServerPreparedStatement.java:612)
>       at 
> com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:384)
>       at 
> com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
>       at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
>       at 
> com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
>       at 
> com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
>       at 
> com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
>       at 
> com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:320)
>       at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
>       at 
> org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
>       at 
> org.apache.jackrabbit.core.util.db.ConnectionHelper.execute(ConnectionHelper.java:473)
>       at 
> org.apache.jackrabbit.core.util.db.ConnectionHelper.reallyExec(ConnectionHelper.java:303)
>       at 
> org.apache.jackrabbit.core.util.db.ConnectionHelper$1.call(ConnectionHelper.java:285)
>       at 
> org.apache.jackrabbit.core.util.db.ConnectionHelper$1.call(ConnectionHelper.java:281)
>       at 
> org.apache.jackrabbit.core.util.db.ConnectionHelper$RetryManager.doTry(ConnectionHelper.java:493)
>       at 
> org.apache.jackrabbit.core.util.db.ConnectionHelper.exec(ConnectionHelper.java:281)
>       at 
> org.apache.jackrabbit.core.data.db.DbDataStore.addRecord(DbDataStore.java:356)
>       at 
> org.apache.jackrabbit.core.value.BLOBInDataStore.getInstance(BLOBInDataStore.java:121)
>       at 
> org.apache.jackrabbit.core.value.InternalValue.getBLOBFileValue(InternalValue.java:629)
>       at 
> org.apache.jackrabbit.core.value.InternalValue.create(InternalValue.java:384)
>       at 
> org.apache.jackrabbit.core.value.InternalValueFactory.create(InternalValueFactory.java:102)
>       at 
> org.apache.jackrabbit.core.value.ValueFactoryImpl.createValue(ValueFactoryImpl.java:121)
>       at 
> org.apache.jackrabbit.core.value.ValueFactoryImpl.createValue(ValueFactoryImpl.java:110)
>       at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:3404)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to