-
Notifications
You must be signed in to change notification settings - Fork 188
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
panic: putting same entry twice not supported #521
Comments
Ouch, seems our newly incorporated cache has a bug. |
Our nodes are crashing because of this, and we need this fixed ASAP. If no one is working on this, we can take it, |
sure, go ahead. Correct behaviour is to ignore the message. |
The |
We can either:
|
I am fine with both, but my intuition inclines toward the second option. WDYT, @vyzo |
just ignore the message i would say, panic is very bad. |
dont do the sweep in Has, will need xlock. |
Also, we need to implement background sweeping at some point, for both cache impls, as this eager sweep business has implications for locking. |
There are many places where processLoop is locked unnecessarily :) |
I know, but it seemed fine. Though background sweeping is a better approach so, let's just remove panic for now, as you've said |
yeah, although we try to make it fast. But point taken, ok, lets fix Has. But please do remove the panic, it needs to ignore the message (and maybe log something in debug). |
We are racing ;) To summarize: Other than that, the panic must go. |
More generally, if we are using bg sweeping, we can greatly simplify everything. We dont need queues, just a map of mid to expiry. We can and should do for both implementations. |
Ok, bg sweeping can be done in a separate PR. Let's remove the panic as a start: #522. |
@vyzo, mind releasing a patch? |
We certainly can, but i was thinking of doing bg sweeping first (unless you want to do it). |
Fair, no need to keep that tech debt around. |
Updates go-libp2p-pubsub to version that fixes libp2p/go-libp2p-pubsub#521
The text was updated successfully, but these errors were encountered: