Skip to content

Commit 02fd38c

Browse files
committed
WIP: fix
1 parent b283825 commit 02fd38c

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

ansible/playbooks/roles/run-transfer-speed/files/shard_transfer.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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):

ansible/playbooks/roles/run-transfer-speed/tasks/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
OUTPUT_FILENAME: "{{ working_dir }}/results.json"
5151
WORK_DIR: "{{ working_dir }}"
5252
PYTHONUNBUFFERED: "1"
53+
register: benchmark_output
54+
55+
- name: Show benchmark output
56+
debug:
57+
msg: "{{ benchmark_output.stdout_lines }}"
5358

5459
- name: Read results
5560
ansible.builtin.slurp:

0 commit comments

Comments
 (0)