From 1fd602762864df0ac87730a2d21a2acdaf2f8515 Mon Sep 17 00:00:00 2001 From: Gregory Newman-Smith Date: Wed, 4 Sep 2024 17:22:43 +0100 Subject: [PATCH] fix failing test + mistake in docs Signed-off-by: Gregory Newman-Smith --- docs/api/components/schemas.yaml | 3 ++- rest/config_test.go | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/api/components/schemas.yaml b/docs/api/components/schemas.yaml index 2366baf393..b8c6e263d5 100644 --- a/docs/api/components/schemas.yaml +++ b/docs/api/components/schemas.yaml @@ -1304,10 +1304,11 @@ Database: description: The maximum number of revisions that can be stored in the revision cache. type: string default: 5000 - max_item_count: + max_memory_count_mb: description: |- The maximum amount of memory the revision cache should take up in MB, setting to 0 will disable any eviction based on memory at rev cache. When set this memory limit will work in in hand with revision cache size parameter. So you will potentially get eviction at revision cache both based off memory footprint and number of items in the cache. + **This is an enterprise-edition feature only** type: integer default: 0 shard_count: diff --git a/rest/config_test.go b/rest/config_test.go index 3b8fdba31a..bb37d240b8 100644 --- a/rest/config_test.go +++ b/rest/config_test.go @@ -3095,6 +3095,8 @@ func TestRevCacheMemoryLimitConfig(t *testing.T) { resp = rt.SendAdminRequest(http.MethodGet, "/db1/_config", "") RequireStatus(t, resp, http.StatusOK) + // empty db config struct + dbConfig = DbConfig{} require.NoError(t, json.Unmarshal(resp.BodyBytes(), &dbConfig)) assert.NotNil(t, dbConfig.CacheConfig)