From 12a92939bfdb192f148c14ac2a7f63574db35116 Mon Sep 17 00:00:00 2001 From: Amnon Heiman Date: Thu, 10 Sep 2015 18:19:33 +0300 Subject: [PATCH 1/2] API: cache service save priod time to return 0 We do not save the cache, so the get for save priod in second should return 0, to indicate never like it is done in origin. Signed-off-by: Amnon Heiman --- api/cache_service.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/cache_service.cc b/api/cache_service.cc index 17a6dd5897..b589b9b667 100644 --- a/api/cache_service.cc +++ b/api/cache_service.cc @@ -12,8 +12,8 @@ namespace cs = httpd::cache_service_json; void set_cache_service(http_context& ctx, routes& r) { cs::get_row_cache_save_period_in_seconds.set(r, [](std::unique_ptr req) { - // TBD - unimplemented(); + // We never save the cache + // Origin uses 0 for never return make_ready_future(0); }); @@ -25,8 +25,8 @@ void set_cache_service(http_context& ctx, routes& r) { }); cs::get_key_cache_save_period_in_seconds.set(r, [](std::unique_ptr req) { - // TBD - unimplemented(); + // We never save the cache + // Origin uses 0 for never return make_ready_future(0); }); @@ -38,8 +38,8 @@ void set_cache_service(http_context& ctx, routes& r) { }); cs::get_counter_cache_save_period_in_seconds.set(r, [](std::unique_ptr req) { - // TBD - unimplemented(); + // We never save the cache + // Origin uses 0 for never return make_ready_future(0); }); From 9d099b3a8d7183d49700b58a2e0bceafb72e4bcb Mon Sep 17 00:00:00 2001 From: Amnon Heiman Date: Thu, 10 Sep 2015 18:22:22 +0300 Subject: [PATCH 2/2] API: Workaround for bloom filter memory calculation The bloom filter memory calculation is missing, as a workaround until it will be completed, the memory calculation will return 0. It is needed by the nodetool info command. Signed-off-by: Amnon Heiman --- api/column_family.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/api/column_family.cc b/api/column_family.cc index 1d375afc49..600d7353d3 100644 --- a/api/column_family.cc +++ b/api/column_family.cc @@ -475,7 +475,10 @@ void set_column_family(http_context& ctx, routes& r) { cf::get_bloom_filter_off_heap_memory_used.set(r, [] (std::unique_ptr req) { //TBD - unimplemented(); + // FIXME + // We are missing the off heap memory calculation + // Return 0 is the wrong value. It's a work around + // until the memory calculation will be available //auto id = get_uuid(req->param["name"], ctx.db.local()); return make_ready_future(0); }); @@ -488,7 +491,10 @@ void set_column_family(http_context& ctx, routes& r) { cf::get_index_summary_off_heap_memory_used.set(r, [] (std::unique_ptr req) { //TBD - unimplemented(); + // FIXME + // We are missing the off heap memory calculation + // Return 0 is the wrong value. It's a work around + // until the memory calculation will be available //auto id = get_uuid(req->param["name"], ctx.db.local()); return make_ready_future(0); }); @@ -501,7 +507,10 @@ void set_column_family(http_context& ctx, routes& r) { cf::get_compression_metadata_off_heap_memory_used.set(r, [] (std::unique_ptr req) { //TBD - unimplemented(); + // FIXME + // We are missing the off heap memory calculation + // Return 0 is the wrong value. It's a work around + // until the memory calculation will be available //auto id = get_uuid(req->param["name"], ctx.db.local()); return make_ready_future(0); });