Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-8306

Creating review with commits is taking long time

    XMLWordPrintable

Details

    Description

      During creation of review with commits, Crucible requests database with query:

      select cruciblere0_.cru_revision_id as col_0_0_, storedpath1_.cru_path_id as col_1_0_ from cru_revision cruciblere0_ inner join cru_stored_path storedpath1_ on cruciblere0_.cru_path=storedpath1_.cru_path_id where cruciblere0_.cru_source_name=? and (storedpath1_.cru_hash in (? , ? , ? , ?))
      

      Followed by multiple selects (about 300):

       

      2018-07-24 06:33:40,897 DEBUG [qtp1438988851-497 ] org.hibernate.SQL SqlStatementLogger-logStatement - select cruciblere0_.cru_revision_id as cru_revi1_49_0_, cruciblere0_.cru_create_date as cru_crea2_49_0_, cruciblere0_.cru_commit_date as cru_comm3_49_0_, cruciblere0_.cru_author_name as cru_auth4_49_0_, cruciblere0_.cru_deletion as cru_dele5_49_0_, cruciblere0_.cru_file_type as cru_file6_49_0_, cruciblere0_.cru_binary as cru_bina7_49_0_, cruciblere0_.cru_added as cru_adde8_49_0_, cruciblere0_.cru_modified as cru_modi9_49_0_, cruciblere0_.cru_moved as cru_mov10_49_0_, cruciblere0_.cru_copied as cru_cop11_49_0_, cruciblere0_.cru_detail_version as cru_det12_49_0_, cruciblere0_.cru_source_name as cru_sou13_49_0_, cruciblere0_.cru_path as cru_pat14_49_0_, cruciblere0_.cru_revision as cru_rev15_49_0_, cruciblere0_.cru_revision_display_name as cru_rev16_49_0_, cruciblere0_.cru_upload_item as cru_upl17_49_0_, cruciblere0_.cru_oversize as cru_ove18_49_0_ from cru_revision cruciblere0_ where cruciblere0_.cru_revision_id=?
      2018-07-24 06:33:40,912 TRACE [qtp1438988851-497 ] org.hibernate.type.descriptor.sql.BasicBinder BasicBinder-bind - binding parameter [1] as [INTEGER] - 1324187
      
      ...
      
      2018-07-24 06:34:59,904 DEBUG [qtp1438988851-497 ] org.hibernate.SQL SqlStatementLogger-logStatement - select cruciblere0_.cru_revision_id as cru_revi1_49_0_, cruciblere0_.cru_create_date as cru_crea2_49_0_, cruciblere0_.cru_commit_date as cru_comm3_49_0_, cruciblere0_.cru_author_name as cru_auth4_49_0_, cruciblere0_.cru_deletion as cru_dele5_49_0_, cruciblere0_.cru_file_type as cru_file6_49_0_, cruciblere0_.cru_binary as cru_bina7_49_0_, cruciblere0_.cru_added as cru_adde8_49_0_, cruciblere0_.cru_modified as cru_modi9_49_0_, cruciblere0_.cru_moved as cru_mov10_49_0_, cruciblere0_.cru_copied as cru_cop11_49_0_, cruciblere0_.cru_detail_version as cru_det12_49_0_, cruciblere0_.cru_source_name as cru_sou13_49_0_, cruciblere0_.cru_path as cru_pat14_49_0_, cruciblere0_.cru_revision as cru_rev15_49_0_, cruciblere0_.cru_revision_display_name as cru_rev16_49_0_, cruciblere0_.cru_upload_item as cru_upl17_49_0_, cruciblere0_.cru_oversize as cru_ove18_49_0_ from cru_revision cruciblere0_ where cruciblere0_.cru_revision_id=?
      2018-07-24 06:34:59,912 TRACE [qtp1438988851-497 ] org.hibernate.type.descriptor.sql.BasicBinder BasicBinder-bind - binding parameter [1] as [INTEGER] - 2797806

       

      These queries can take up to 1m 30s during our investigation (duration depends on amount of fetched data) and were invoked several times during the process of creation review.

       

      Attachments

        Issue Links

          Activity

            People

              mtokarski@atlassian.com Marek Tokarski
              mtokarski@atlassian.com Marek Tokarski
              Votes:
              31 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: