Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-50741

Auto-Compaction Settings: Allow "undefined" value for Database/View Fragmentation percentage

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.1.0
    • 7.1.0
    • ns_server, UI
    • None
    • Untriaged
    • 1
    • Yes
    • UI 2022-Feb

    Description

      Auto-Compaction database/view fragmentation percentage fields cannot be unchecked: if the user unchecks those fields, the next refresh will show the previously saved value. 

      We need the same behaviour as database/view size fields which was implemented in these changes:

      https://review.couchbase.org/c/ns_server/+/169527

      https://review.couchbase.org/c/ns_server/+/169688

      • 0 should not be an invalid value anymore so the UI can send it as a reset value
      • UI should receive "undefined" for a percentage that was reset

      The current behaviour is like this:

      When the user unchecks database fragmentation percentage and clicks Save, UI sends this payload to controller/setAutoCompaction

      databaseFragmentationThreshold[size]: 12582912
      viewFragmentationThreshold[percentage]: 30
      magmaFragmentationPercentage: 50
      indexCompactionMode: circular
      indexCircularCompaction[daysOfWeek][Monday]: true
      indexCircularCompaction[daysOfWeek][Tuesday]: true
      indexCircularCompaction[daysOfWeek][Wednesday]: true
      indexCircularCompaction[daysOfWeek][Thursday]: true
      indexCircularCompaction[daysOfWeek][Friday]: true
      indexCircularCompaction[daysOfWeek][Saturday]: true
      indexCircularCompaction[daysOfWeek][Sunday]: true
      indexCircularCompaction[interval][fromHour]: 0
      indexCircularCompaction[interval][toHour]: 0
      indexCircularCompaction[interval][fromMinute]: 0
      indexCircularCompaction[interval][toMinute]: 0
      indexCircularCompaction[interval][abortOutside]: false
      parallelDBAndViewCompaction: false
      purgeInterval: 3 

      So databaseFragmentationThreshold[percentage] property is not sent (currently 0 can't be sent because it's an invalid value);

      UI gets back these properties from settings/autoCompaction:

      {"autoCompactionSettings":{"databaseFragmentationThreshold":{"percentage":30,"size":12582912},
        "viewFragmentationThreshold":{"percentage":30,"size":"undefined"},
        "parallelDBAndViewCompaction":false,
        "magmaFragmentationPercentage":50,
        "indexCompactionMode":"circular","indexCircularCompaction":{"daysOfWeek":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday","interval":{"fromHour":0,"toHour":0,"fromMinute":0,"toMinute":0,"abortOutside":false}},"indexFragmentationThreshold":{"percentage":30}},"purgeInterval":3} 

      databaseFragmentationThreshold.percentage being 30 instead of "undefined" will show this value to the user:

      What UI needs to fix this issue:

      • UI should be able to send databaseFragmentationThreshold[percentage]: 0 and viewFragmentationThreshold[percentage]: 0 when posting to controller/setAutoCompaction 
      • GET settings/autoCompaction should return "undefined" for databaseFragmentationThreshold.percentage and databaseFragmentationThreshold.percentage if they were previously set with 0

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              steve.watanabe Steve Watanabe
              raluca.lupu Raluca Lupu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty