Multitenant issue in WCS Paid version vs. Sandbox

Hello – I am working on WCS and had a working sandbox cluster with multi-tenancy.
Switching to the paid version cause some problems. (I am using the v3 client)
It seems like the tenants are overwriting each other – the dimensions stored are correct, but the object count is the count of the last tenant uploaded.
I can actually watch the count change depending on the tenant I upload. (I have deleted everything and tried a few times)
Querying the data also shows that only the last tenant uploaded can be queried.
To test things I deleted the contents of my paid cluster, and started a new sandbox cluster. I then uploaded to both the paid and sandbox clusters using the same code

batch.add_data_object(
                data_object=batch_data, 
                class_name=classname, 
                tenant=tenant_name, 
                vector=embedtype 

Please see below for the results:
Paid version: dimension stored = 9,833,472, object count = 905
sandbox version: dimension stored = 9,833,472, object count = 6,402 - which is correct
NOTE: When ''multiTenancyConfig': {'enabled': False} there seems to be no issue, and I can have several classes that sit fine side by side - as long as they
Any suggestions on what this issue could be? Thanks!

Hi Sam! Welcome to our community :hugs:

We had some issues with the object count in WCS dashboard.

I even started yesterday a script do count those objects and dimensions directly in Weaviate, however, it doesn’t support multi tenant yet:

dim = 0
objects = 0
for c in client.schema.get()["classes"]:
    # get class  name
    class_name = c["class"]
    # get object count
    count_query = client.query.aggregate(class_name).with_meta_count().do()
    if not count_query.get("errors"):
        object_count = count_query["data"]["Aggregate"][class_name][0]["meta"]["count"]
        # get one object, to discover the dimensions length
        dimension_query = client.query.get(class_name).with_additional("vector").with_limit(1).do()
        if dimension_query["data"]["Get"][class_name]:
            dimension_length = len(dimension_query["data"]["Get"][class_name][0]["_additional"]["vector"])
            # add up the dimensions for each object
            dim += object_count * dimension_length
        else:
            dimension_length = 0
        # add up the object count for each collection
        objects += object_count
        print(class_name, object_count, dimension_length)
    else:
        print("ERROR!", class_name, count_query.get("errors"))
print("####")
print("total_dimensions", dim)
print("objects", objects)

So this is probably an issue with the dashboard count.

I will update this script soon, so it also count for multi tenant classes.

Thanks!

Hello thanks @DudaNogueira

I think it is more than just the dashboard count though – it is also affecting the retrievals. I got sidelined but will post examples in a bit.

Hi sam! Feel free to ping me in our slack so I can take a closer look.

Thanks!

you got it – Many thanks!