Soil
Soil copied to clipboard
adding and removing keys should be logged in order to the journal
I thought this would be fixed by using an OrderedDictionary in the skip list dictionary but that is already the case.
"in order" means which order? The OrderedDictionary is sorted by when the key was added, not in the order that they are later in the index (see https://github.com/ApptiveGrid/Soil/issues/415 )
with remove and add being in two different dictionaries, there is no order between them: we log first all adds, then all removes. This can lead to the order between add and remove passible being wrong ("add, remove, add remove" is logged as "add add remove remove")
Now SoilIndexedDictionary uses newValues removedValues just for creating the journal.
To have the Journal in correct oder, we need to instead have one OrdredCollection that stores both add and removes.
But this list need to be condensed to not log multiple adds/remove for the same key
Note from discussion:
- We should not fix this now on the level of the SoilIndexDictionary, but do this later on the level of the page when it manages newValues/removedValues