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

[Bug]: lemmy_federate::worker: last successful id is higher than latest id in database #4363

Closed
4 tasks done
wkelton opened this issue Jan 11, 2024 · 6 comments
Closed
4 tasks done
Labels
bug Something isn't working

Comments

@wkelton
Copy link

wkelton commented Jan 11, 2024

Requirements

  • Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a single bug? Do not put multiple bugs in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Summary

Log is being flooded by these messages:

ERROR lemmy_federate::worker: <some remote instance>: last successful id 135 is higher than latest id 0 in database (did the db get cleared?)

Steps to Reproduce

I'm using docker to run a lemmy server. I upgraded to 0.19.2 and everything seemed fine. Started and stopped the container a few times (was upgrading to pict-rs 0.5.0), then saw these messages flooding the log.

Technical Details

See above.

Version

0.19.2

Lemmy Instance URL

No response

@wkelton wkelton added the bug Something isn't working label Jan 11, 2024
@Nutomic
Copy link
Member

Nutomic commented Jan 11, 2024

cc @phiresky

@phiresky
Copy link
Collaborator

phiresky commented Jan 11, 2024

@wkelton Did you manually make any changes in the database like clearing out the activities tables?

Or, was the last activity (create post, vote, comment) on your server more than a week ago?

Does it go away if you do a single action? (e.g. vote on something)

@wkelton
Copy link
Author

wkelton commented Jan 11, 2024

I made no manual database changes. The only changes I made were do my docker-compose.yml / env files (for going to 0.19.2 and upgrading pictrs to 0.5 - required changing their env vars). However, there is some chance I may have inadvertently run lemmy with a previous version after I had run it with 0.19.2 - not sure if I did that though).

Indeed it has been more than a week for any activity. I voted on a comment and will post back if that resolves it.

@wkelton
Copy link
Author

wkelton commented Jan 11, 2024

I appear to no longer be getting the error.

Was this just some weird corner case with old activity and upgrading, or is there a "requirement" for activity within a certain amount of time (so, if no activity within a week, this error will show up)?

@Nutomic
Copy link
Member

Nutomic commented Jan 12, 2024

I think the error message is wrong/misleading because it defaults to id 0 if none was found in the db. It should probably use an option instead, so that the default value isnt necessary.

@phiresky
Copy link
Collaborator

Well that part is intentional because it only shows up if there were activities before and there no longer are.

But I forgot that the activities are cleared automatically and small instances might not actually have an activity in that time period.

So probably we can just remove the error message. it's supposed to warn the people that put"truncate send_activities" in their crontab to save space that they are breaking federation.

Nutomic added a commit that referenced this issue Jun 14, 2024
dessalines pushed a commit that referenced this issue Jun 14, 2024
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