| Summary: | Enhance LockMgr with write options | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Caspar D. <caspar_d> | ||||||||||||||||||||||||||||
| Component: | cdo.core | Assignee: | Caspar D. <caspar_d> | ||||||||||||||||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||||||||||||||||||||||
| Severity: | enhancement | ||||||||||||||||||||||||||||||
| Priority: | P3 | CC: | saulius.tvarijonas | ||||||||||||||||||||||||||||
| Version: | 4.1 | Flags: | stepper:
review+
stepper: review+ |
||||||||||||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||||||||||||||
| Hardware: | All | ||||||||||||||||||||||||||||||
| OS: | All | ||||||||||||||||||||||||||||||
| Whiteboard: | Power to the People | ||||||||||||||||||||||||||||||
| Bug Depends on: | |||||||||||||||||||||||||||||||
| Bug Blocks: | 352330 | ||||||||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||||||||
|
Description
Caspar D.
Created attachment 199467 [details]
Patch v1
Incomplete, only contains a crude version of the new lockMgr.
Changes to client-side API not yet done.
Created attachment 199472 [details]
Patch v2
All existings tests passing now, except those verifying persistent
locks. New tests (verifying WRITE_OPTION behavior) yet to be done.
Created attachment 199477 [details]
Patch v3
All existing tests passing now.
TBD:
- Client-side API
- New tests for WRITE_OPTION locks
Created attachment 199539 [details]
Patch v4
Refactored changes based on new insight that there are no API constraints
on changes to an internal class.
Created attachment 199541 [details]
Patch v5
Refactored again; base class now genericized, and moved to net4j.util
Created attachment 199558 [details]
Patch v6
Functionality complete, I believe.
TBD: Performance optimizations, especially view-to-locks lookup
Created attachment 199567 [details]
Patch v7
Forgot to persist those write options! Better now :-)
Created attachment 199814 [details]
Patch v8
Performance optimizations
Created attachment 200142 [details]
Patch v9
I broke the tests ;-(
Created attachment 200146 [details]
Patch v10 - ready to be committed
Good work!
I can approve the patch when Javadoc has been added to CDOObject.cdoWriteOption() and RWOLockManager ;-) Actually I did approve it and rely on your promise to add JavaDocs ;-) Committed revision 8806. Not resolving yet, cause JavaDocs yet to be done. Created attachment 200333 [details]
Patch (JavaDocs)
Added JavaDocs.
> a read lock prevents write locks by others, but allows read locks by others, and is therefore <b>non-exclusive</b> How are write option requests impacted? > a write lock prevents read locks by others and write locks by others, and is therefore <b>exclusive</b> How are write option requests impacted? > a write option prevents write locks by others and write options by others, but allows read locks by others, and is therefore <b>exclusive</b> (In reply to comment #15) > > a read lock prevents write locks by others, but allows read locks by others, and is therefore <b>non-exclusive</b> > > How are write option requests impacted? They're not. > > a write lock prevents read locks by others and write locks by others, and is therefore <b>exclusive</b> > > How are write option requests impacted? > They're not.. but in this case I your question makes me realize that this is a mistake. A write lock must prevent write options by others. Will amend both the docs and the logic. Excellent ;-) Created attachment 200342 [details]
Patch v2 (JavaDocs + logic)
Created attachment 200345 [details]
Patch v3 (JavaDocs + logic)
Committed revision 8820. Resolving as FIXED. Closing. |