"autoCompactionSettings: false" in bucket-level response for auto-compaction settings

Hi,

I am trying to discover what auto compaction settings are configured for my bucket. I am using this document for reference: https://developer.couchbase.com/documentation/server/4.0/rest-api/rest-autocompact-get.html

Using the following command I can get the Cluster-wide settings:
curl -u ${username:password} ${fqdn}:8091/settings/autoCompaction

My response:
{
“autoCompactionSettings”:{
“parallelDBAndViewCompaction”:false,
“databaseFragmentationThreshold”:{
“percentage”:30,
“size”:“undefined”
},
“viewFragmentationThreshold”:{
“percentage”:30,
“size”:“undefined”
},
“indexFragmentationThreshold”:{
“percentage”:30
}
},
“purgeInterval”:3
}

Using the following command I can get the Bucket-level settings:
curl -u ${username:password} ${fqdn}:8091/pools/default/buckets/[bucket_name]

My response (relevant section):

“autoCompactionSettings”:false,

Can you tell me if this means that

a) the Cluster-wide settings are being used for my bucket (i.e. no bucket level settings are set)

OR

b) auto compaction is not enabled at all for my bucket

Any help available ?

@dylan.armstrong,

It’s a good question; I don’t have an answer for sure, and I think there might be a gap in the documentation. I created an issue in the documentation project here: https://github.com/couchbase/docs-cb4/issues/1343

@dylan.armstrong Generally the auto-compaction settings are set at the cluster through the endpoint you’ve already identified.

In some cases it may be desirable to have different auto-compaction behaviour for different buckets (perhaps some are more write-heavy than others). In this case you can override these settings at a per-bucket level.

If you do not choose to override the cluster-wide compaction settings for a bucket then it will show 'autoCompactionSettings': false, this means that the cluster-wide settings are used (whatever they may be, could be enabled or disabled). In the situation where the settings have been overridden, the value for ‘autoCompactionSettings’ will be similar to that you have shown above:

{
"autoCompactionSettings":{
"parallelDBAndViewCompaction":false,
"databaseFragmentationThreshold":{
"percentage":30,
"size":"undefined"
},
"viewFragmentationThreshold":{
"percentage":30,
"size":"undefined"
},
"indexFragmentationThreshold":{
"percentage":30
}
},
"purgeInterval":3
}
1 Like

Thanks for the replies. @matt.carabine thanks for the clarification. @matthew.groves I agree that the documentation is lacking and should include the information here from Matt.