1<div>
2  <h3>Database Fragmentation</h3>
3  <div class="sub_section">
4    <div>Set the database fragmentation level to determine the point when compaction is triggered.</div>
5    <p class="row">
6      <input
7        type="checkbox"
8        id="48099acb-df16-4e1e-9949-2aaccfeb9e41"
9        ng-model="autoCompactionSettings.databaseFragmentationThreshold.percentageFlag"
10        ng-disabled="(rbac && !rbac.cluster.settings.write)"
11        class="check-for-databaseFragmentationThresholdPercentage">
12      <input
13        type="number" min="0" max="100"
14        id="decaebe7-bb14-4c1f-9bb1-70ceb7fb2e43"
15        ng-model="autoCompactionSettings.databaseFragmentationThreshold.percentage"
16        name="databaseFragmentationThreshold_percentage_"
17        ng-class="{invalid: validationErrors.databaseFragmentationThreshold_percentage_}"
18        ng-disabled="!autoCompactionSettings.databaseFragmentationThreshold.percentageFlag || (rbac && !rbac.cluster.settings.write)"> %
19      <span class="error-container err-databaseFragmentationThreshold-percentage-" ng-show="validationErrors.databaseFragmentationThreshold_percentage_">{{validationErrors.databaseFragmentationThreshold_percentage_}}</span>
20    </p>
21    <p class="row">
22      <input
23        type="checkbox"
24        ng-disabled="(rbac && !rbac.cluster.settings.write)"
25        class="check-for-databaseFragmentationThresholdSize"
26        ng-model="autoCompactionSettings.databaseFragmentationThreshold.sizeFlag">
27      <input
28        type="number" min="0"
29        id="settings-db-compaction-size"
30        name="databaseFragmentationThreshold_size_"
31        ng-model="autoCompactionSettings.databaseFragmentationThreshold.size"
32        ng-class="{invalid: validationErrors.databaseFragmentationThreshold_size_}"
33        ng-disabled="!autoCompactionSettings.databaseFragmentationThreshold.sizeFlag || (rbac && !rbac.cluster.settings.write)" class="size"> MB
34      <span class="error-container err-databaseFragmentationThreshold-size-" ng-show="validationErrors.databaseFragmentationThreshold_size_">{{validationErrors.databaseFragmentationThreshold_size_}}</span>
35    </p>
36  </div>
37
38  <h3>View Fragmentation</h3>
39  <div class="sub_section">
40    <div>Set the view fragmentation level to determine the point when compaction is triggered.</div>
41    <p class="row">
42      <input
43        type="checkbox"
44        ng-disabled="(rbac && !rbac.cluster.settings.write)"
45        id="0a2cb7a3-84b7-4822-bf32-87d3e192926a"
46        ng-model="autoCompactionSettings.viewFragmentationThreshold.percentageFlag"
47        class="check-for-viewFragmentationThresholdPercentage" />
48      <input
49        id="8e49a092-3108-46ed-b5c3-9b95c4ceda6f"
50        ng-model="autoCompactionSettings.viewFragmentationThreshold.percentage"
51        name="viewFragmentationThreshold_percentage_"
52        ng-class="{invalid: validationErrors.viewFragmentationThreshold_percentage_}"
53        ng-disabled="!autoCompactionSettings.viewFragmentationThreshold.percentageFlag || (rbac && !rbac.cluster.settings.write)"
54        type="number" min="0" max="100"> %
55      <span class="error-container err-viewFragmentationThreshold-percentage-" ng-show="validationErrors.viewFragmentationThreshold_percentage_">{{validationErrors.viewFragmentationThreshold_percentage_}}</span>
56    </p>
57    <p class="row">
58      <input
59        type="checkbox"
60        ng-disabled="(rbac && !rbac.cluster.settings.write)"
61        class="check-for-viewFragmentationThresholdSize"
62        ng-model="autoCompactionSettings.viewFragmentationThreshold.sizeFlag">
63      <input
64        type="number" min="0"
65        id="settings-view-compaction-size"
66        ng-model="autoCompactionSettings.viewFragmentationThreshold.size"
67        name="viewFragmentationThreshold_size_"
68        ng-class="{invalid: validationErrors.viewFragmentationThreshold_size_}"
69        ng-disabled="!autoCompactionSettings.viewFragmentationThreshold.sizeFlag || (rbac && !rbac.cluster.settings.write)"
70        class="size"> MB
71      <span class="error-container err-viewFragmentationThreshold-size-" ng-show="validationErrors.viewFragmentationThreshold_size_">{{validationErrors.viewFragmentationThreshold_size_}}</span>
72    </p>
73  </div>
74  <h3>Time Interval</h3>
75  <div class="sub_section">
76    <div class="row">
77      <input
78        type="checkbox"
79        ng-disabled="(rbac && !rbac.cluster.settings.write)"
80        id="f5962927-16af-4eb6-802c-86fe6c3a238d"
81        class="check-for-allowedTimePeriod"
82        ng-model="autoCompactionSettings.allowedTimePeriodFlag"/>
83      <label for="f5962927-16af-4eb6-802c-86fe6c3a238d">Set the time interval for when compaction is allowed to run</label>
84    </div>
85    <div
86      mn-period="allowedTimePeriod"
87      auto-compaction-settings="autoCompactionSettings"
88      rbac="rbac"
89      errors="validationErrors">
90    </div>
91    <div class="row">
92      <input
93        id="f6fb6488-c05a-4baa-88f7-27032da6600b"
94        type="checkbox"
95        ng-disabled="(rbac && !rbac.cluster.settings.write)"
96        name="parallelDBAndViewCompaction"
97        ng-class="{invalid: validationErrors.parallelDBAndViewCompaction}"
98        ng-model="autoCompactionSettings.parallelDBAndViewCompaction"
99        value="true" />
100      <label for="f6fb6488-c05a-4baa-88f7-27032da6600b">Compact Bucket and Views Index in parallel</label>
101      <div class="error-container err-parallelDBAndViewCompaction" ng-show="validationErrors.parallelDBAndViewCompaction">{{validationErrors.parallelDBAndViewCompaction}}</div>
102    </div>
103  </div>
104
105  <h3 class="only-when-40" ng-if="!isBucketsSettings && poolDefault.compat.atLeast40 && indexSettings && indexSettings.storageMode !== 'memory_optimized'">Index Fragmentation</h3>
106  <div
107    class="sub_section only-when-40"
108    id="js_index_fragmentation_settings"
109    ng-if="!isBucketsSettings && poolDefault.compat.atLeast40 && indexSettings && indexSettings.storageMode !== 'memory_optimized'">
110    <div>Write Mode:</div>
111    <div class="row">
112      <input
113        type="radio"
114        ng-disabled="(rbac && !rbac.cluster.settings.write)"
115        id="index-regular-compaction-radio"
116        class="check-for-allowedTimePeriod"
117        name="indexCircularCompaction"
118        ng-value="false"
119        ng-model="autoCompactionSettings.indexCircularCompactionFlag">
120      <label for="index-regular-compaction-radio">Append-only Write Mode with index fragmentation level to determine the point when compaction is triggered</label>
121    </div>
122    <div class="row">
123      <input
124        type="number" min="0" max="100"
125        ng-disabled="(rbac && !rbac.cluster.settings.write) || autoCompactionSettings.indexCircularCompactionFlag === true"
126        ng-model="autoCompactionSettings.indexFragmentationThreshold.percentage"> %
127      <span
128        class="error-container err-indexFragmentationThreshold-percentage-"
129        ng-show="validationErrors.indexFragmentationThreshold_percentage_">{{validationErrors.indexFragmentationThreshold_percentage_}}</span>
130    </div>
131    <div class="row">
132      <input
133        type="radio"
134        ng-disabled="(rbac && !rbac.cluster.settings.write)"
135        id="index-circular-compaction-radio"
136        class="check-for-allowedTimePeriod"
137        name="indexCircularCompaction"
138        ng-value="true"
139        ng-model="autoCompactionSettings.indexCircularCompactionFlag">
140      <label for="index-circular-compaction-radio">Circular Write Mode with time interval for when compaction is allowed to run</label>
141    </div>
142    <div class="row">
143      <span ng-repeat="day in daysOfWeek">
144        <input
145          ng-disabled="!autoCompactionSettings.indexCircularCompactionFlag || !rbac.cluster.settings.write"
146          type="checkbox"
147          style="vertical-align:middle;"
148          id="days_of_week_{{day}}"
149          ng-model="autoCompactionSettings.indexCircularCompactionDaysOfWeek[day]"
150          ng-value="day">
151        <label style="vertical-align:middle;margin-right:5px;" for="days_of_week_{{day}}">
152          {{day}}
153        </label>
154      </span>
155    </div>
156    <div class="row">
157      <div
158        mn-period="indexCircularCompaction"
159        auto-compaction-settings="autoCompactionSettings"
160        rbac="rbac"
161        errors="validationErrors">
162      </div>
163    </div>
164  </div>
165
166  <h3>Metadata Purge Interval</h3>
167  <div class="sub_section">
168    <div class="row">
169      <label for="fc68aaf1-9519-4eeb-ba28-3daa042aae22">Set the frequency of metadata purge interval:</label>
170      <input
171        ng-disabled="(rbac && !rbac.cluster.settings.write)"
172        ng-model="autoCompactionSettings.purgeInterval"
173        ng-class="{invalid: validationErrors.purgeInterval}"
174        id="fc68aaf1-9519-4eeb-ba28-3daa042aae22"
175        name="purgeInterval"
176        style="width: 2.5em;">
177      <span>Range 0.04 (1 H) - 60days</span>
178      <a class="text_11 tooltip"><span>What's this?</span>
179        <span class="tooltip_msg"><span>
180            Metadata Purge Interval. Allowed range is 0.04 - 60 where 0.04 = 1h, 0.5 = 12h. Set how frequently a node will purge metadata on deleted items. If set too high, may significantly delay the node from reclaiming disk space. If set too low, may cause data inconsistencies in XDCR or Views.
181        </span></span>
182      </a>
183      <div class="error-container err-purgeInterval" style="display: inline; padding-left: 0;" ng-show="validationErrors.purgeInterval">{{validationErrors.purgeInterval}}</div>
184    </div>
185  </div>
186</div>
187