Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JiraPluginSettings with Data Center

Is it safe to use JiraPluginSettings in clustered environment? 

If not, how to store plugin settings (changed infrequently) in a safe way?

@Chris Fuller, you are probably the best person to ask.

Thank you,

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
Answer accepted
crf Atlassian Team Dec 30, 2015

No.  And it's such a terrible interface, I'm not sure why you would want to, anyway. smile

The list of what's wrong with PluginSettings is a long one, but here's a small taste:

  1. There is no way to ask it what keys exist.  Plugins generally work around this by using a known key that contains a list of all of the other keys.  That list and the entries cannot be updated atomically, which can lead to data corruption even without a cluster.  (Applinks suffers from this, for example)
  2. The namespacing strategy is embarrassing.  You can say your plugin data belongs to a project (saying it belongs to anything else, per spec, should throw an IllegalArgumentException), or you can stick it in the global settings with a prefix.  This global namespace is exactly the same one that ApplicationProperties uses, but the encoding of the data is slightly different, so they pollute each other's namespaces with differently encoded information.  Awesome.
  3. The backend storage that it uses is just PropertySet, which you could use directly if you wanted to.  Of course, that itself is a rather nasty beast that splits its information across multiple tables.  It has the main table for entries and each data type (number, string, text = strings greater than 255 chars, date, etc.) goes to a different table. This has its advantages, but efficiency and atomic updates aren't on that list.  You can't do updates to that safely without a cluster lock, so the same is true of PluginSettings.

I could go on, but look, please just no.

PluginSettings really has no point in existing at all except that Cloud (called Studio at the time) needed some storage mechanism that cross-product plugins like Applinks could use before we had Active Objects available to answer that question.  Even though it has its own set of problems, AO is at least an improvement over PluginSettings.

The strategy that Atlassian's own JIRA plugins are using for this is to use AO to describe the schema management, but the more flexible PocketKnife QueryDSL library to do the actual data manipulation, as it can do all the things like optimistic updates that you really need to achieve cluster safety and still keep your sanity.  It isn't perfect (for example, AO can't declare multi-column indexes and blows up trying to remove any that you added yourself), but I think that this is the best answer we currently have available to us.


You are guru and that's not flattery :-).

Excellent and clear answer. Thank you. I believe Atlassian should invest into documentation more. PluginSettings are still marketed all around in docs, e.g.:

crf Atlassian Team Dec 30, 2015

Fair cop. Unfortunately, these search-and-destroy missions are always a bit difficult and our first line of defense as developers is always to mark the old way as deprecated. Nobody has actually gotten around to doing that to PluginSettings, yet. Also, those tutorials aren't aimed at JIRA Data Center compatibility in particular; they're just a quick and dirty getting started guide. There are more comprehensive instructions for JDC here: (although, sadly, they don't talk about plugin data storage in particular, either)


Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you