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

Ordering of messages #117

Open
arj03 opened this issue Feb 12, 2023 · 3 comments
Open

Ordering of messages #117

arj03 opened this issue Feb 12, 2023 · 3 comments

Comments

@arj03
Copy link
Member

arj03 commented Feb 12, 2023

I'm looking at a trace that looks something like this:

notify branch [ 'root', 'v1' ] ssb:feed/bendybutt-v1/PVC3N4bEm5cVk5PMwZZ2BYI414B4kaqgxYyWsx29w5g=
got branch [ 'root', 'v1' ]
notify branch [ 'root', 'v1', '4' ] ssb:feed/bendybutt-v1/hqBQcbGAAKc5sG5oaJ4yzLwKipXmaVC6OmmOjFB---c=
got branch [ 'root', 'v1', '4' ]
notify branch [ 'root', 'v1', '4', 'main' ] @3XVgQP3VFF4r+YMtJk3QgOSz5zAWvfZXS0zYfqppf14=.ed25519
got branch [ 'root', 'v1', '4', 'main' ]
notify branch [ 'root', 'group/additions' ] @oH4x34UXqEkdUaJ2aY83+l6ZftNzJ6k7BU2hS8Edxkk=.ed25519
notify branch [ '1' ] ssb:feed/bendybutt-v1/TH9SxgrS2vHbp6iRsSlS3SaqFrIn-8-DzB4t-dNig5g=
got branch [ '1', 'group/additions' ]
got branch [ '1' ]

Got branch is what you get from ssb.metafeeds.branchStream({ old: true, live: true }) and notify is from inside this module on live data.

The tree looks like this:

root
└─┬ v1
  ├─┬ 4
  │ └── main
  └─┬ 1
    └── group/additions

For some reason it seems like 1 doesn't have a proper parent (v1), which is really strange because it seems like 4 works fine.

@arj03
Copy link
Member Author

arj03 commented Feb 13, 2023

Aha, this one seems to be buggy:

update(feedDetails) {

Doesn't update parent. There is more though.

@arj03
Copy link
Member Author

arj03 commented Feb 13, 2023

And the second bug seems to be that the messages comes in the wrong order. updateLookupFromMsg first gets the group/additions and later the 1. So the parent links don't correctly align. It's a bit strange, because the messages from network should come in, in the correct order. So it's a bit strange that we would get them shuffled.

@arj03
Copy link
Member Author

arj03 commented Feb 13, 2023

Argh fuck. It's because replicate is cheating and just requests all feeds at once. https://github.com/ssbc/ssb-tribes2/blob/4beef23cc85cd2fd4f34a1ab8e3f63bc3d54daba/test/helpers/replicate.js#L13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant