| Summary: | IllegalArgumentException: revised == -1 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Michal Tkacz <Michal.Tkacz> | ||||
| Component: | cdo.core | Assignee: | Eike Stepper <stepper> | ||||
| Status: | CLOSED WORKSFORME | QA Contact: | Eike Stepper <stepper> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | martin.fluegge | ||||
| Version: | 4.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 299897 | ||||||
| Attachments: |
|
||||||
|
Description
Michal Tkacz
This one is hard to reproduce. It can eventually occur if two clients commit tree structure changes at the same time, possibly trying to cause containment cycles. Changing the order of adjustForCommit() and lockObject() in TransactionCommitContext.write() should fix this by ensuring that the created timestamp of revisions is set when the RevisionManager tries to load and revise old revisions. Patch coming... Created attachment 185935 [details]
Patch v1 - for future reference
Committed to HEAD > It can eventually occur if two clients commit tree structure changes > at the same time, possibly trying to cause containment cycles. I didn't thought I had any of these :) > Changing the order of adjustForCommit() and lockObject() in > TransactionCommitContext.write() should fix this by ensuring that > the created timestamp of revisions is set when the RevisionManager > tries to load and revise old revisions. Patch coming... Thanks, I'll test it and post here if the problem occurs again. I had to undo this fix because it caused a regression of bug 299897. Investigating a new fix... I must admit that I have no clue why this can happen. Clear so far: - During the containment cycle check in lockObjects() the revisionManager is asked to provide a revision (is it just accidentally the root resource??). - That revision is not cached but loaded from the IStore. - The loaded revision is added to the revision cache - The cache detects tat the previous revision is already cached and tries to "revise" it, i.e.: oldRevision.setRevised(newRevision.getTimeStamp() - 1); According to the exception message the new revision has a zero timestamp. But that should not happen as it was just loaded from the store and no persistent revision must hav a zero creation timestamp. The best I can do for now, I've added an extra check against zero timestamps. Michal: 1) Are you modyfing the backend data, bypassing CDO? 2) When this issue occurs again, can you check that the backend data is correct (dump db, etc.)? 3) Are you using repository replication? 4) For now I'm closing this as WORKSFORME. Please reopen if this happens again... > 1) Are you modyfing the backend data, bypassing CDO?
No, I don't.
2) When this issue occurs again, can you check that the backend data is correct
(dump db, etc.)?
Sure, if I manage to catch it again of course.
3) Are you using repository replication?
No.
4) For now I'm closing this as WORKSFORME. Please reopen if this happens
again...
OK.
|