diff --git a/ee/app/services/search/zoekt/scheduling_service.rb b/ee/app/services/search/zoekt/scheduling_service.rb index 915272990afd56a9452e2a17267e494c5b9ac4bb..9b88656e7e9051efff94c4f5d70775cd80540fec 100644 --- a/ee/app/services/search/zoekt/scheduling_service.rb +++ b/ee/app/services/search/zoekt/scheduling_service.rb @@ -227,7 +227,8 @@ def node_assignment namespace_id: zoekt_enabled_namespace.root_namespace_id, zoekt_node_id: node.id, zoekt_enabled_namespace: zoekt_enabled_namespace, - replica: Replica.for_enabled_namespace!(zoekt_enabled_namespace) + replica: Replica.for_enabled_namespace!(zoekt_enabled_namespace), + reserved_storage_bytes: space_required ) zoekt_index.state = :ready if Feature.disabled?(:zoekt_initial_indexing_task) zoekt_indices << zoekt_index diff --git a/ee/spec/services/search/zoekt/scheduling_service_spec.rb b/ee/spec/services/search/zoekt/scheduling_service_spec.rb index ca5ecf0acc546b39311b042b0c717c3b677b32e5..eaa95e0f0c4707904aeba61cca7736be848da399 100644 --- a/ee/spec/services/search/zoekt/scheduling_service_spec.rb +++ b/ee/spec/services/search/zoekt/scheduling_service_spec.rb @@ -336,6 +336,7 @@ index = zkt_enabled_namespace2.indices.last expect(index).not_to be_nil expect(index.namespace_id).to eq zkt_enabled_namespace2.root_namespace_id + expect(index.reserved_storage_bytes).not_to be_nil expect(index).to be_pending end