@@ -66,18 +66,28 @@ def storage_types(self, uri: str) -> dict:
6666 try :
6767 r = requests .get (f"{ uri } /telemetry?details_level=6" , timeout = 10 )
6868 if not r .ok :
69+ print (f" Telemetry request failed: { r .status_code } " )
6970 return {}
70- for coll in r .json ().get ("result" , {}).get ("collections" , {}).get ("collections" , []):
71+ data = r .json ()
72+ collections = data .get ("result" , {}).get ("collections" , {}).get ("collections" , [])
73+ if not collections :
74+ print (f" No collections in telemetry, keys: { list (data .get ('result' , {}).keys ())} " )
75+ return {}
76+ for coll in collections :
7177 if coll .get ("id" ) == COLLECTION :
7278 types = {}
7379 for shard in coll .get ("shards" , []):
74- for seg in shard .get ("local" , {}).get ("segments" , []):
80+ local = shard .get ("local" )
81+ if not local :
82+ continue
83+ for seg in local .get ("segments" , []):
7584 for vec in seg .get ("config" , {}).get ("vector_data" , {}).values ():
7685 st = vec .get ("storage_type" , "unknown" )
7786 types [st ] = types .get (st , 0 ) + 1
7887 return types
79- except Exception :
80- pass
88+ print (f" Collection '{ COLLECTION } ' not found, available: { [c .get ('id' ) for c in collections ]} " )
89+ except Exception as e :
90+ print (f" Telemetry error: { e } " )
8191 return {}
8292
8393 def wait_mmap (self , uri : str , timeout = 180 ):
0 commit comments