On 2022-09-13 04:37, Edward K. Ream wrote:
> On Tuesday, September 13, 2022 at 5:14:19 AM UTC-5 Edward K. Ream wrote:
> 
>> Being wary of UUIDs should be part of Leo's institutional memory.
> 
> PR #2827 <https://github.com/leo-editor/leo-editor/issues/2827> adds a 
> warning to NodeIndices.computeNewIndex:
> 
> def computeNewIndex(self) -> str:
>     """Return a new gnx."""
> 
>     # Warning! Warning! Warning!
> 
>     # Don't even *think* about changing the format of gnxs!
>     # Doing so could introduce the worst kind of bugs: subtle and rare.
> 
>     # See this post: 
> https://groups.google.com/g/leo-editor/c/Lldywoievn4/m/RUMMzB7fBgAJ
> 
>     t_s = self.update()  # Updates self.lastTime and self.lastIndex.
>     gnx = g.toUnicode(f"{self.userId}.{t_s}.{self.lastIndex:d}")
>     return gnx
> 
> Edward
> 
Having read the discussion on #1348 (thank you for the link), I must
strongly disagree with this assessment.

There were two problems involved in that bug:
1) Leo created a spurious vnode when reading an outline.
2) This exposed a timing race due to using timestamp based IDs.

Introducing UUIDs was a proposed solution. Sequence numbers were the
chosen alternative. Both were reasonable.

Using username and timestamp information in your workflow is both fair
and reasonable. Blaming UUIDs for a bug caused by improper use of
timestamps is neither.

This seems to be a hot button for you, so I'll drop the issue.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/4effea75-c9da-896c-a5f1-11efe60bee7a%40runbox.com.

Reply via email to