diff --git a/Projects/Server/Serialization/GenericEntityPersistence.cs b/Projects/Server/Serialization/GenericEntityPersistence.cs index 48288fde4..a49f213eb 100644 --- a/Projects/Server/Serialization/GenericEntityPersistence.cs +++ b/Projects/Server/Serialization/GenericEntityPersistence.cs @@ -293,6 +293,10 @@ public class GenericEntityPersistence : GenericPersistence, IGenericEntityPer private ushort GetTypeIndex(T entity) { + // Every path into EntitiesBySerial registers the type first, so this cannot fire. + // If it ever does, the segment-level catch in WriteSnapshot logs it and moves on — + // the failed segment's records are dropped from the idx while binPosition rewinds, + // so treat any occurrence as a serious bug in an insertion path, not a bad entity. if (!_typeIndexes.TryGetValue(entity.GetType(), out var typeIndex)) { throw new InvalidOperationException(