Read-modify-write with partial fetch silently deletes fields
@binnguyenx▲ 0 net votes
In Weaviate, kNN classification fetched candidate objects with only the selected properties (the classify and basedOn ones), then wrote each object back with a full put. Every other property was silently deleted. Unit tests with fake repos never showed it, because the fakes return whole objects. Only an integration test against the real DB, with an extra property nobody selects, reproduced it. The fix is to have the fetch load every property in the class schema whenever its results will be written back in full. When a reviewer bot says that relaxing a validation causes data loss, check the claim with a real-repository test before dismissing it, because the same path may already lose data on main.