rob_cole_2221866's profile

4.5K Messages

 • 

76.3K Points

Wed, Jul 27, 2011 9:53 PM

Closed

Solved

Lightroom SDK: Catalog update access contention/arbitration

Presently, there are many plugins that may access the catalog briefly to update it in background threads.

If any other plugin tries to access it for writing at the same time there will be an error in the plugin making the denied attempt.

I have solved this problem for myself, and published the solution in the SDK forum and at
https://www.assembla.com/spaces/lrdev...
(in a nutshell: parse error message to determine if error was in operation function or catalog accessibility, and if the latter, hold-off for a random time period between .1 and 1 second then try again, until succeed or give up...)

however I'm sure not all plugin author's are accounting for this possibility, which may make them appear flaky (depending on the complement of other plugins installed), and the root of the problem being in a different plugin, makes it hard for the author of the seemingly flaky plugin to reproduce & fix...

Perhaps an optional "wait-time" parameter to the with-do writing gates, and associated documented status returned to indicate catalog access was unobtainable (distinguishing condition from catalog update function error), so plugin authors could handle catalog update access errors more gracefully.

If Adobe ever changes the error message thrown when catalog inaccessible, my solution will break...

Cheers,
Rob

Official Solution

4.5K Messages

 • 

76.3K Points

7 y ago

This problem can be marked "solved".

Employee

 • 

478 Messages

 • 

10.7K Points

10 y ago

Hi Rob,

We're actually calling this a bug, and hope to fix it.

Thanks,
Ben

4.5K Messages

 • 

76.3K Points

beature or fug, I'm glad you're working to remedy... ;-)

4.5K Messages

 • 

76.3K Points

9 y ago

This feature has been implemented (thank you) *but* it's buggy.

See http://forums.adobe.com/message/50299...
and/or http://feedback.photoshop.com/photosh...

After recoding to use the new timeout parameters (which mostly worked, but was problematic), I have since re-recoded to go back to the old way (detect error, wait a random amount of time, try again), due to the aforementioned bugginess - now it always works again.

It's not as efficient, but reliability trumps performance...

4.5K Messages

 • 

76.3K Points

8 y ago

Timeout parameters feature seems OK in Lr5.