• 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: multi-instance sync woes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multi-instance sync woes


  • Subject: Re: multi-instance sync woes
  • From: OC <email@hidden>
  • Date: Tue, 25 Nov 2014 19:38:36 +0100

Chuck,

thanks a very big lot!

On 25. 11. 2014, at 19:11, Chuck Hill <email@hidden> wrote:

> There are no simple solutions.  You need to be aware of where this can happen in your app and code for it.

A thorough refactoring is exactly what I would very much like to do :)

Alas, most of the current code is pretty old, written years ago with a firm intention to run single-instance (and even without  WOAllowsConcurrentRequestHandling), and before I get the time to re-write the guts and do it right, I must make the current thing at least _somewhat_ stable and useable.

>> When I get the "condition 379. Optimistic locking: multiple transaction conflict detected" I do essentially nothing -- I just wait a random couple of tenths of second, and retry.
>
> I have seen that, but very rarely.  If all of the connections to the data base use "/isolation=read_committed/locking=optimistic” you should not get this.  I have caused this by using FrontBase Manager or some other tool to look at the database as it used a different isolation level and / or (don’t recall) locking

I might be wrong, but I believe it happens whenever two separate instances happen to update both before they commit, e.g., A: update, B: update (same row), A: commit, B: commit.

Depends on the application logic how probable this is, but I believe in principle it can always happen, and I believe if it does, in this scenario -- with the "TRANSACTION ISOLATION LEVEL read committed, LOCKING optimistic" setting in both sessions -- the latter commit consistently yields "Exception 379. Optimistic locking: multiple transaction conflict detected".

It happens to me occassionally; far as I can say, the isolation level is all right. Of course, I may be wrong, as always.

By the way, leads me to another question -- is there a way to send SQL and read the result string? I actually wanted to send "show transaction;" and put the result to my application log, to be sure the setting works on the production server (where I can't check through FBManager). I have found I should be able to use ERXEOAccessUtilities.evaluateSQLWithEntity(Named) to send the SQL, but I can't see how to obtain the results?

Thanks a lot again,
OC


 _______________________________________________
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: multi-instance sync woes
      • From: Chuck Hill <email@hidden>
References: 
 >multi-instance sync woes (From: OC <email@hidden>)
 >Re: multi-instance sync woes (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: multi-instance sync woes
  • Next by Date: Now to suppress excess logs at: multi-instance sync woes
  • Previous by thread: Re: multi-instance sync woes
  • Next by thread: Re: multi-instance sync woes
  • Index(es):
    • Date
    • Thread