P: SDK: Catalog update access contention/arbitration

2 Votes
LEGEND ,
Jul 27, 2011 Jul 27, 2011

Copy link to clipboard

Copied

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

Bug Fixed
TOPICS
SDK

Views

20

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 02, 2014 Nov 02, 2014
This problem can be marked "solved".

Votes

Translate

Translate
5 Comments
Adobe Employee ,
Jul 27, 2011 Jul 27, 2011

Copy link to clipboard

Copied

Hi Rob,

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

Thanks,
Ben

Votes

Translate

Translate

Report

Report
LEGEND ,
Jul 27, 2011 Jul 27, 2011

Copy link to clipboard

Copied

beature or fug, I'm glad you're working to remedy... 😉

Votes

Translate

Translate

Report

Report
LEGEND ,
May 06, 2013 May 06, 2013

Copy link to clipboard

Copied

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...

Votes

Translate

Translate

Report

Report
LEGEND ,
Dec 27, 2013 Dec 27, 2013

Copy link to clipboard

Copied

Timeout parameters feature seems OK in Lr5.

Votes

Translate

Translate

Report

Report
LEGEND ,
Nov 02, 2014 Nov 02, 2014

Copy link to clipboard

Copied

LATEST
This problem can be marked "solved".

Votes

Translate

Translate

Report

Report