• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SharedEditingContext Write Locks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SharedEditingContext Write Locks?


  • Subject: Re: SharedEditingContext Write Locks?
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 18 Nov 2005 15:33:40 +1100

Hi Dov,

On 18/11/2005, at 1:35 PM, Dov Rosenberg wrote:

For the SEC we do things like:

    sec.objectsForFetchSpecification(...)

Which appears to be causing our locking problem under load.

According to what I have learned - objectsForFetchSpecification() will cause
the SEC to get a write lock in order to update its state. It can not get a
write lock until all of the read locks have been released.


Under load conditions there are readers all the time and the write lock can
not be obtained.

Could you perhaps create a subclass of EOSharedEditingContext, setting it as the default SEC, and
- implement a readers-writer locking process that will queue readers if a writer is in the queue so that writer(s) don't get starved.
- i.e., when the change notification comes through you have a writer...


It seems that calling objectsForFetchSpecification() to either fetch data
into the shared editing context or to refresh it too often is a bad thing.
When multiple threads are trying to do the same operation - the EOF deadlock
occurs.

deadlock or writer starvation? i.e., readers keep on functioning, yes?

Can anyone think of a reasonable strategy? Besides dumping EOF and using
JDBC.

The above wouldn't take too much effort and would give you control over the reader/writer starvation problems without having to change much else I would think. Hmm.. I might look into that for myself...


with regards,
--

Lachlan Deck


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: SharedEditingContext Write Locks?
      • From: Ben Trumbull <email@hidden>
    • Re: SharedEditingContext Write Locks?
      • From: Dov Rosenberg <email@hidden>
References: 
 >Re: SharedEditingContext Write Locks? (From: Dov Rosenberg <email@hidden>)

  • Prev by Date: Re: Cannot Resolve Symbol Error/WO 5.3.1
  • Next by Date: Re: SharedEditingContext Write Locks?
  • Previous by thread: Re: SharedEditingContext Write Locks?
  • Next by thread: Re: SharedEditingContext Write Locks?
  • Index(es):
    • Date
    • Thread