You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Mete Atamel (JIRA)" <ji...@apache.org> on 2013/01/22 14:12:12 UTC

[jira] [Resolved] (OAK-577) Incorrect usage of WriteResult#getError/getLastError

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

Mete Atamel resolved OAK-577.
-----------------------------

    Resolution: Fixed

Fixed with rev 1436894.
                
> Incorrect usage of WriteResult#getError/getLastError
> ----------------------------------------------------
>
>                 Key: OAK-577
>                 URL: https://issues.apache.org/jira/browse/OAK-577
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: mongomk
>            Reporter: Mete Atamel
>            Priority: Minor
>
> When running MongoMKBranchMergeTest#concurrentNonConflictingMerges with high number of threads (>20), I sometimes see the following Mongo exception:
> Caused by: java.lang.IllegalStateException: The connection may have been used since this write, cannot obtain a result
> 	at com.mongodb.WriteResult.getLastError(WriteResult.java:100)
> 	at com.mongodb.WriteResult.getLastError(WriteResult.java:73)
> 	at com.mongodb.WriteResult.getField(WriteResult.java:141)
> 	at com.mongodb.WriteResult.getError(WriteResult.java:118)
> 	at org.apache.jackrabbit.mongomk.impl.command.CommitCommandNew.markAsFailed(CommitCommandNew.java:364)
> 	at 
> According to this link [0], this is due to updating a collection without WriteConcern.SAFE and then calling WriteResult#getLastError. That's exactly what we do with commit collection. We need to change MongoMK code to update commit collection with WriteConcern.SAFE.
> [0] https://groups.google.com/d/topic/mongodb-user/xzw0Cb831VY/discussion

--
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