Enhancement
Critical
Major
Detail
Detail
Critical
#25842
TL-Sync deletes random objects if it does not find the actual ones to be deleted
TL-Sync transfers serialized tl:KnowledgeBase [tl:ChangeSet|ChangeSets]. In order to identify the objects across systems, their tl:ExtID is also written to the [tl:ItemEvent|ItemEvents] of the [tl:ChangeSet|ChangeSets]. The internal tl:TLID(ItemEvent.objectId) is not removed from the tl:ItemEvent. Instead, it is replaced on receipt after resolving the tl:ExtID. If the tl:ExtID cannot be resolved, the tl:TLID is not replaced. Then, on the receiving system, the object that has the same tl:TLID as the object to be deleted on the sending system, i.e. a random one, will be deleted.
Solution
It is determined which tl:ExtIDs could not be resolved. The associated changes are removed from the changeset: deletions and updates are removed completely. References to these objects are removed from the changeset, leaving other attribute updates intact.
Test
test.com.top_logic.kafka.services.TestTLSyncReceiveMissingExtReference