Write GlobalId index when serializing to RocksDB

rocks_db_file_storage already exposes a `g|`-prefixed guid -> instance
name map, but RocksDbSerializer never populated it, so by_guid() on a
converted file always threw.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-08-06 10:16:34 +10:00
parent 38e0e0e297
commit 74b405a9f7
2 changed files with 27 additions and 0 deletions
@@ -115,6 +115,11 @@ def test_rocks():
b = f.key_value_store_query(f"t|{iden}|0")[1:]
assert set(struct.unpack("Q", b[i : i + 8])[0] for i in range(1, len(b), 9)) == {136, 138}
g = ifcopenshell.open(fn)
for inst in g.by_type("IfcRoot"):
assert f.by_guid(inst.GlobalId).id() == inst.id()
del g
del f
gc.collect()