col = ext_client.collections.get(name=“TEST_TENANT_0”)
col.config.get_shards()
working fine if all tenants are HOT
but getting the below exception If tenant is in COLD
status.
UnexpectedStatusCodeError: get shards! Unexpected status code: 404, with response body: {‘error’: [{‘message’: ‘shard Tenant_A: shard Tenant_A does not exist’}]}.
server : v1.23.11
client : v4.5.7
hi @Dharanish !!
I was not able to reproduce this.
here is what I have tried:
import weaviate
from weaviate import classes as wvc
client = weaviate.connect_to_local()
print(weaviate.__version__, client.get_meta().get("version"))
client.collections.delete("Test")
collection = client.collections.create(
"Test",
vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_cohere(),
multi_tenancy_config=wvc.config.Configure.multi_tenancy(enabled=True, auto_tenant_creation=True, auto_tenant_activation=True)
)
collection.with_tenant("T1").data.insert({"text": "Text for T1"})
collection.with_tenant("T2").data.insert({"text": "Text for T2"})
collection.tenants.update(tenants=[
wvc.tenants.Tenant(name="T1", activity_status=wvc.tenants.TenantActivityStatus.COLD),
wvc.tenants.Tenant(name="T2", activity_status=wvc.tenants.TenantActivityStatus.COLD)
])
col = client.collections.get(name="Test")
col.config.get_shards()
Is something similar to this that you are trying?
Thanks!