stephenallred
Hi,
I've found that an UPDATE command seems to act as an ADD command if a row is sent that doesn't already exist in Lightstreamer's internal table i.e. has a new key.
Is this correct, or must the ADD command be used? If so, what are the side effects of just using the UPDATE command?
Many Thanks,
Steve
Dario Crivelli
In general, the distincion between ADD and UPDATE commands might be inferred from the current state of the key,
so we request that the Data Adapter specifies which of the two cases it is in
only for clarity when reading the event sequence
and in order to allow a crosscheck of the event sequence.
Since we encountered many cases of inconsistent usage of the ADD or UPDATE flag,
we decided to forgive wrong usage entirely and to just log error or warning messages.
This policy will be adopted by the forthcoming 3.6 release of the Server.
Currently, there are cases in which ADD and UPDATE behave differently, because, basically, an event with an inconsistent flag may be discarded (after suitable logging).
This happens, for instance, for an UPDATE within a snapshot and for an ADD upon an existing key.
On the other hand, an UPDATE upon a non-existing key (not within a snapshot) is already treated as an ADD, with no side effect.