fix is auto compaction disabled
align API to the recent changes at https://github.com/scylladb/scylla/pull/6176 don't wrap API exceptions into IOException for enableAutoCompaction
This commit is contained in:
parent
fc43c56369
commit
c7dcbd7f42
|
@ -320,7 +320,7 @@ public class ColumnFamilyStore extends MetricsMBean implements ColumnFamilyStore
|
||||||
@Override
|
@Override
|
||||||
public boolean isAutoCompactionDisabled() {
|
public boolean isAutoCompactionDisabled() {
|
||||||
log(" isAutoCompactionDisabled()");
|
log(" isAutoCompactionDisabled()");
|
||||||
return client.getBooleanValue("column_family/autocompaction/" + getCFName());
|
return !client.getBooleanValue("column_family/autocompaction/" + getCFName());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Number of tombstoned cells retreived during the last slicequery */
|
/** Number of tombstoned cells retreived during the last slicequery */
|
||||||
|
|
|
@ -1444,13 +1444,7 @@ public class StorageService extends MetricsMBean implements StorageServiceMBean,
|
||||||
log("enableAutoCompaction(String ks, String... columnFamilies)");
|
log("enableAutoCompaction(String ks, String... columnFamilies)");
|
||||||
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
|
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
|
||||||
APIClient.set_query_param(queryParams, "cf", APIClient.join(columnFamilies));
|
APIClient.set_query_param(queryParams, "cf", APIClient.join(columnFamilies));
|
||||||
try {
|
client.post("/storage_service/auto_compaction/" + ks, queryParams);
|
||||||
client.post("/storage_service/auto_compaction/" + ks, queryParams);
|
|
||||||
} catch (RuntimeException e) {
|
|
||||||
// FIXME should throw the right exception
|
|
||||||
throw new IOException(e.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue