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

Your post/event doesn’t show up on your timeline after publishing #1075

Open
danlatorre opened this issue Jan 6, 2023 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@danlatorre
Copy link

danlatorre commented Jan 6, 2023

Seems to be a long-standing, very intermittent bug --
you post something
it's actually posted to SSB
but it takes a long time to show up on your timeline.

This could a text-post, or a like on someone else's post, and it doesn't show up on your timeline right away, it can take hours (or longer?)

e.g. I noticed this myself for the first time today, around 1:30 PM and now it's 6 PM and still I don't see these new events on my timeline.

@danlatorre danlatorre converted this from a draft issue Jan 6, 2023
@danlatorre danlatorre changed the title your post doesn’t show up after publishing Your post/event doesn’t show up after publishing Jan 6, 2023
@danlatorre danlatorre added the bug Something isn't working label Jan 6, 2023
@danlatorre danlatorre changed the title Your post/event doesn’t show up after publishing Your post/event doesn’t show up on your timeline after publishing Jan 6, 2023
@mplorentz
Copy link
Member

I think this happened to me once and I determined that it was caused by go-ssb. Maybe this won't happen after we switch to scuttlego. Either way this flow needs some attention (see #1033).

@martindsq
Copy link
Member

After gobot correctly publish something, we execute the following code:

Log.info("Published message with key \(key)")
                
// Copy the newly published post into the ViewDatabase immediately.
do {
    guard let self = self else {
        completionQueue.async { completion(MessageIdentifier.null, BotError.notLoggedIn) }
        return
    }
    let lastPostIndex = try self.database.largestSeqFromPublishedLog()
    let publishedPosts = try self.bot.getPublishedLog(after: lastPostIndex)
    try self.database.fillMessages(msgs: publishedPosts)
    try self.updateNumberOfPublishedMessages(for: identity)
    self.numberOfPublishedMessagesLock.unlock()
    completionQueue.async { completion(key, nil) }
} catch {
    self?.numberOfPublishedMessagesLock.unlock()
    completionQueue.async { completion(MessageIdentifier.null, error) }
}

If any try fails, we fail the whole operation, but some steps could have executed correctly. We could benefit from having a single transaction to include all operations and rollback it if one of them fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants