[
https://jira.nuxeo.com/browse/NXP-6650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=91909#action_91909
]
Florent Guillaume commented on NXP-6650:
----------------------------------------
What happens is that getFragmentsFromFetchedRows receives twice the same RowId
for a row that's absent (for the locks table in the selenium tests).
The first call to getFragmentFromFetchedRow creates it as ABSENT and registers
it in the pristine map, and on the second call it crashed.
This can only happen if in getNodesByIds we fetch 2 different proxies with the
same target
2 so that context.getMulti(proxiesRowIds, true) returns 2 identical targets
- target hier must be already in context
so that context.getMulti(hierRowIds, true) returns 2 identical fragments
from context
- target "locks" fragment must be not in context and absent in db
so that getMulti -> getIfPresent returns null -> in todo
-> getFromMapper -> getFragmentsFromFetchedRows -> getFragmentFromFetchedRow
first new SimpleFragment(row, State.ABSENT, this) will register in context
-> second call to getFragmentFromFetchedRow will find it already present in
context
But I couldn't reproduce these conditions in a unit test.
> Fix VCS error when fetching some rows
> -------------------------------------
>
> Key: NXP-6650
> URL: https://jira.nuxeo.com/browse/NXP-6650
> Project: Nuxeo Enterprise Platform
> Issue Type: Bug
> Components: Core SQL Storage
> Affects Versions: 5.4.1
> Reporter: Florent Guillaume
> Assignee: Florent Guillaume
> Priority: Major
> Fix For: 5.4.2
>
>
> Error observed in 5.4.1 during selenium tests:
> Exception: java.lang.IllegalStateException. message: ABSENT
> at
> org.nuxeo.ecm.core.storage.sql.PersistenceContext.getFragmentFromFetchedRow(PersistenceContext.java:591)
> at
> org.nuxeo.ecm.core.storage.sql.PersistenceContext.getFragmentsFromFetchedRows(PersistenceContext.java:548)
> at
> org.nuxeo.ecm.core.storage.sql.PersistenceContext.getFromMapper(PersistenceContext.java:478)
> at
> org.nuxeo.ecm.core.storage.sql.PersistenceContext.getMulti(PersistenceContext.java:520)
> at
> org.nuxeo.ecm.core.storage.sql.SessionImpl.getNodesByIds(SessionImpl.java:626)
> at
> org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.getNodesByIds(ConnectionImpl.java:190)
> at
> org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.getDocumentsById(SQLSession.java:624)
> at
> org.nuxeo.ecm.core.storage.sql.coremodel.SQLQueryResult.getDocumentModels(SQLQueryResult.java:102)
> at
> org.nuxeo.ecm.core.api.AbstractSession.query(AbstractSession.java:1484)
> ... 92 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.nuxeo.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets