Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-4183

Enable invalidating Hibernate cache to read changes from database

    • 0
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      A possibility to invalidate Hibernate cache used in ORM on Bamboo's database would be handy to reload/re-read data directly from database after e.g. making bulk changes in plans. In case when a myriad of similar plans is maintained rather via database (updating XML_DEFINITION_DATA) than by clicking on all the possible plans in UI. Now it has to be done by restarting Bamboo, since Hibernate cache (with a rather long TTL) keeps the old definitions and the new ones from the database are visible after restart. Restarting the build server's app is very inconvenient especially when using Elastic Bamboo, since shutting down instances and starting them up again (with success!) takes a significant amount of time.

      The functionality itself could be implemented either as a button e.g. "Reload DB" in Administration interface e.g. on Database Configuration tab. A more sophisticated version could show it only in case of real databases - MySQLs or PostgreSQLs, but not in case of embedded HSQL databases - as it doesn't make sense I suppose. Having it in UI would allow the verification of who can reload it (not allowing of mischievous behaviour if Bamboo server is accessible from public network).

      A simplified (or just a quick-win solution) would be to allow making an HTTP request to Bamboo's UI or API to execute Hibernate cache invalidation.

            [BAM-4183] Enable invalidating Hibernate cache to read changes from database

            Atlassian Update – [12 April 2019]

            Hi everyone,

            Thank you for your interest in this issue.

            While this suggestion has gathered significant interest, we're unable to implement all of the excellent suggestions you make. We don't plan to work on this for the foreseeable future.
            For all the configuration at scale issues we suggest using Bamboo Specs.

            Kind regards,
            Bamboo Team

            Krystian Brazulewicz added a comment - Atlassian Update – [12 April 2019] Hi everyone, Thank you for your interest in this issue. While this suggestion has gathered significant interest, we're unable to implement all of the excellent suggestions you make. We don't plan to work on this for the foreseeable future. For all the configuration at scale issues we suggest using Bamboo Specs . Kind regards, Bamboo Team

            Till now only these ones:

            • BUILD_DEFINITION.XML_DEFINITION_DATA - it seems to have a rather long TTL in Hibernate cache, e.g.:
              update BUILD_DEFINITION
              set XML_DEFINITION_DATA = (select XML_DEFINITION_DATA
                                                                       from (select * from BUILD_DEFINITION
                                                                       where BUILD_ID = (select BUILD_ID
                                                                                                           from BUILD
                                                                                                           where FULL_KEY = 'OXP28UNIT-PHP43MYSQL50INNODB')
                                                                       ) as temp)
              where BUILD_ID in (select BUILD_ID
                                                   from BUILD
                                                   where FULL_KEY like 'OXP28UNIT-PHP%');
              
            • AUTHOR.LINKED_USER_NAME - seems to have rather short TTL so in fact here Hibernate cache's invalidation is not necessary for me.
              An example query (we've got user names equal to SVN aliases):
              update AUTHOR
              set LINKED_USER_NAME = AUTHOR_NAME
              where LINKED_USER_NAME is null
              and AUTHOR_NAME like '%.%';
              

            Krystian Nowak added a comment - Till now only these ones: BUILD_DEFINITION.XML_DEFINITION_DATA - it seems to have a rather long TTL in Hibernate cache, e.g.: update BUILD_DEFINITION set XML_DEFINITION_DATA = (select XML_DEFINITION_DATA from (select * from BUILD_DEFINITION where BUILD_ID = (select BUILD_ID from BUILD where FULL_KEY = 'OXP28UNIT-PHP43MYSQL50INNODB') ) as temp) where BUILD_ID in (select BUILD_ID from BUILD where FULL_KEY like 'OXP28UNIT-PHP%'); AUTHOR.LINKED_USER_NAME - seems to have rather short TTL so in fact here Hibernate cache's invalidation is not necessary for me. An example query (we've got user names equal to SVN aliases): update AUTHOR set LINKED_USER_NAME = AUTHOR_NAME where LINKED_USER_NAME is null and AUTHOR_NAME like '%.%';

            edwin added a comment -

            Krystian,

            Out of curiosity, which configuration fields are you trying to bulk edit via the database?

            Cheers,
            Edwin

            edwin added a comment - Krystian, Out of curiosity, which configuration fields are you trying to bulk edit via the database? Cheers, Edwin

            That would be really great! Could you possibly give a reference to JIRA so that it would be possible to track this functionality progress?

            Krystian Nowak added a comment - That would be really great! Could you possibly give a reference to JIRA so that it would be possible to track this functionality progress?

            sladey added a comment -

            Krystian, hopefully there is some bulk edit functionality being added to 2.3. This shouls at least partly meet your needs without having to go to add this type of big red button.

            sladey added a comment - Krystian, hopefully there is some bulk edit functionality being added to 2.3. This shouls at least partly meet your needs without having to go to add this type of big red button.

              Unassigned Unassigned
              ac345ce11761 Krystian Nowak
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: