Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MergeTree: Need ability to create LocalReferences to end of sequence #86

Closed
DLehenbauer opened this issue Jun 11, 2019 · 3 comments
Closed
Assignees
Labels
api area: dds Issues related to distributed data structures resolution: won't fix

Comments

@DLehenbauer
Copy link
Contributor

Many MergeTree operations refer to the position at the end of the sequence. For example, consider appending to the end of a sequence:

"0123"
     ^-- Append = insert @4

In order to use LocalReferences to track caret positions, selection ranges, etc. we need the ability to create LocalReference to the position after the last segment in the MergeTree (@4 above).

Today, the LocalReference can only references positions 0..3 in the above example. This limitation has impacted all user of LocalReferences that I'm aware of:

  • FlowView does not use LocalReferences. Instead, it observes ops to update the caret/selection offsets manually.
  • SharedStringInterval users can only include the last position in a sequence if they treat 'end' as inclusive instead of exclusive (Update BREAKING.md for PR 1581 #1761). This has been source of numerous off-by-one errors in Table-Slice / Tablero. (I found another one yesterday.)
  • WebFlow used to attempt to preserve an extra marker at the end of the document. If this is accidentally deleted, the last position in the document can no longer be edited.
  • WebFlow now works around this by crafting a LocalReference that points to sentinel segment that is never inserted into the MergeTree. (See Flow-Document addLocalRef, etc.)
@DLehenbauer
Copy link
Contributor Author

Added another workaround to WebFlow to handle the case where the user deletes the entire document, leaving the LocalRef for the caret position pointing to an undefined segment.

/cc @anthony-murphy

@anthony-murphy anthony-murphy transferred this issue from another repository Sep 19, 2019
@curtisman curtisman added the api label Jan 21, 2020
@curtisman curtisman added area: host Host related issues area: dds Issues related to distributed data structures and removed area: host Host related issues labels Jan 31, 2020
@curtisman curtisman added this to the Future milestone Feb 2, 2020
@vladsud
Copy link
Contributor

vladsud commented May 28, 2021

2 year old issue. @DLehenbauer, @anthony-murphy, we need to either have a plan or punt. Marking as won't for bot to close it if we are not making any progress.

@ghost
Copy link

ghost commented May 31, 2021

Because this issue is marked as "won't fix" and has not had activity for over 3 days, we're automatically closing it for house-keeping purposes.

@ghost ghost closed this as completed May 31, 2021
@danielroney danielroney removed this from the Future milestone Jun 1, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api area: dds Issues related to distributed data structures resolution: won't fix
Projects
None yet
Development

No branches or pull requests

5 participants