Uploaded image for project: 'Confluence Server'
  1. Confluence Server
  2. CONFSERVER-42929

Database Constraint Checker has mismatched definitions for expected non-nullable

    Details

    • Symptom Severity:
      Major
    • Support reference count:
      17
    • Occurrence Factor:
      10%

      Description

      This bug report relates to warnings logged by the Database Constraint Checker which was introduced in Confluence 5.7.

      Cause

      This particular warning occurs because there is a column in the database which should allow null values, but does not according to the check it shouldn't. The upgrade to 5.10 included a task to change those columns to allow non-null but the checker was not updated

      This warning has been encountered on these columns:

      • spaces.lowerspacekey
      • extrnlnks.lowerurl
      • trackbacklinks.lowerurl

      These warnings appear in the logs:

      2016-06-18 19:22:55,489 WARN [AtlassianEvent::CustomizableThreadFactory-1] [core.persistence.schema.StartupSchemaChecker] handleWarnings Database schema is inconsistent with expectations. 3 potential issues found, see below for details.
      2016-06-18 19:22:55,489 WARN [AtlassianEvent::CustomizableThreadFactory-1] [core.persistence.schema.StartupSchemaChecker] handleWarnings Column [lowerspacekey] of table [spaces] has mismatched definitions for expected [Column spaces.lowerspacekey varchar(255) nullable] and actual [Column spaces.lowerspacekey varchar(255) non-nullable]
      2016-06-18 19:22:55,490 WARN [AtlassianEvent::CustomizableThreadFactory-1] [core.persistence.schema.StartupSchemaChecker] handleWarnings Column [lowerurl] of table [extrnlnks] has mismatched definitions for expected [Column extrnlnks.lowerurl varchar(255) nullable] and actual [Column extrnlnks.lowerurl varchar(255) non-nullable]
      2016-06-18 19:22:55,490 WARN [AtlassianEvent::CustomizableThreadFactory-1] [core.persistence.schema.StartupSchemaChecker] handleWarnings Column [lowerurl] of table [trackbacklinks] has mismatched definitions for expected [Column trackbacklinks.lowerurl varchar(255) nullable] and actual [Column trackbacklinks.lowerurl varchar(255) non-nullable]
      

      The upgrade task part of 5.10 is

      2016-06-20 09:34:41,972 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] computeRanges Computing batches for table SPACES...
      2016-06-20 09:34:41,973 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] populateLowerColumn Populating lower-case column(s) [LOWERSPACEKEY] from [SPACEKEY] on table SPACES (0%)...
      2016-06-20 09:34:41,973 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] upgradeTable Updated 2 rows in table SPACES (100%) in 0s...
      2016-06-20 09:34:41,974 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] computeRanges Computing batches for table LINKS...
      2016-06-20 09:34:41,975 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] populateLowerColumn Populating lower-case column(s) [LOWERDESTPAGETITLE, LOWERDESTSPACEKEY] from [DESTPAGETITLE, DESTSPACEKEY] on table LINKS (0%)...
      2016-06-20 09:34:41,976 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] upgradeTable Updated 60 rows in table LINKS (100%) in 0s...
      2016-06-20 09:34:41,976 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] computeRanges Computing batches for table EXTRNLNKS...
      2016-06-20 09:34:41,977 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] upgradeTable Updated 0 rows in table EXTRNLNKS (100%) in 0s...
      2016-06-20 09:34:41,977 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] computeRanges Computing batches for table TRACKBACKLINKS...
      2016-06-20 09:34:41,977 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] upgradeTable Updated 0 rows in table TRACKBACKLINKS (100%) in 0s...
      2016-06-20 09:34:41,977 INFO [localhost-startStop-1] [confluence.upgrade.upgradetask.PopulateLowerFieldsUpgradeTask] doUpgrade Adding not null constraints...
      

      Impact

      No impact. The warning won't impact any of confluence functionalities. No intervention needed.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                14 Vote for this issue
                Watchers:
                31 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  1 year, 2 weeks, 1 day ago