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:
Ivan Prisyazhnyy 2020-05-25 18:58:32 +02:00 committed by Pekka Enberg
parent fc43c56369
commit c7dcbd7f42
2 changed files with 2 additions and 8 deletions

View File

@ -320,7 +320,7 @@ public class ColumnFamilyStore extends MetricsMBean implements ColumnFamilyStore
@Override
public boolean 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 */

View File

@ -1444,13 +1444,7 @@ public class StorageService extends MetricsMBean implements StorageServiceMBean,
log("enableAutoCompaction(String ks, String... columnFamilies)");
MultivaluedMap<String, String> queryParams = new MultivaluedHashMap<String, String>();
APIClient.set_query_param(queryParams, "cf", APIClient.join(columnFamilies));
try {
client.post("/storage_service/auto_compaction/" + ks, queryParams);
} catch (RuntimeException e) {
// FIXME should throw the right exception
throw new IOException(e.getMessage());
}
client.post("/storage_service/auto_compaction/" + ks, queryParams);
}
@Override