Add a unique ID to Interval properties, allow multiple intervals with the same (start, end)#6407
Conversation
|
Replaces #6279. |
■ @fluidframework/base-host: No change
⯅ @fluid-example/bundle-size-tests: +1.83 KB
Baseline commit: eec1d66 |
b3b85e1 to
aa65640
Compare
can you add some multi client tests Refers to: packages/test/test-end-to-end-tests/src/test/sharedInterval.spec.ts:337 in aa65640. [](commit_id = aa656409b2466d834de50a8fbad920c314eec614, deletion_comment = False) |
how does this, defaultIntervalConflictResolver behave with local vs remote conflict? do both clients end up with the same id, or will different id's never conflict Refers to: packages/dds/sequence/src/intervalCollection.ts:288 in aa65640. [](commit_id = aa656409b2466d834de50a8fbad920c314eec614, deletion_comment = False) |
it would be good to add some scenario focus tests. currently you really only test the local client, as there is only one container, and you never load a new container to test rehydration In reply to: 861874250 Refers to: packages/test/test-end-to-end-tests/src/test/sharedInterval.spec.ts:337 in aa65640. [](commit_id = aa656409b2466d834de50a8fbad920c314eec614, deletion_comment = False) |
aa65640 to
811a03d
Compare
|
I do see a client receiving the relevant ops in the test I've been adding to. At least the non-local add(serialized) and delete(serialized) getting called to receive the ops. Can you point me to an example of code that loads a new container to test rehydration? |
|
Yeah, different ID's won't conflict. The compare function will compare ID's if (start, end) are the same. |
039ee0e to
97394fe
Compare
97394fe to
da7613e
Compare
da7613e to
a1d7da7
Compare
There was a problem hiding this comment.
looks to be pre-existing
There was a problem hiding this comment.
Do you think the member name in ISerializedInterval should be changed?
There was a problem hiding this comment.
looks like you moved some methods which make the merge gross, but i'm not sure why anything in add needed to change
There was a problem hiding this comment.
add used to call addInternal, which would hit the case below
There was a problem hiding this comment.
I changed it to make the local and non-local cases more distinct. I had to do that for delete. It does make debugging easier if addInternal is only called in the case where an op comes over the wire. Sorry about the merge, though.
a1d7da7 to
900ac0b
Compare
There was a problem hiding this comment.
it doesn't actually work this way. you need to actually set the reserved id field in props on load from the snapshot, as in the case of shared inverval on a shared string the endpoints can change over time as modifications happen.
overall, i think we might be tackling too many things is this pr, which is making it hard to get any of them in.
There was a problem hiding this comment.
Updating to handle the load case, which is the one I wasn't handling.
900ac0b to
73740d3
Compare
7c17683 to
73a0bed
Compare
c59d1c2 to
21fcf43
Compare
Add and delete ops will be supplied with ID's. delete(start, end) will be deprecated; for now it will delete the interval with a legacy ID based on start/end.
Use the interval ID as a third key for sorting. Fix an issue in serialization of add ops that was causing the original ID not to be sent over the wire.
21fcf43 to
ac0e1c1
Compare
Add methods to get and remove an interval from a collection by ID. Use ID as a third key to determine order in cases of identical (start, end). "delete(start, end)" will remove all (start, end) intervals from the collection. Each such delete will be serialized as an independent operation.