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

The -B/-b option (permanently cached branches) doesn't work with -P (prune mode). #1

Closed
neilstephens opened this issue Aug 27, 2024 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@neilstephens
Copy link
Owner

The -B/-b option (permanently cached branches) doesn't work with -P (prune mode).

The reason is that both options manipulate the "EndPointCache" using assumptions that don't hold when both options are enabled:

	-B/-b is simply implemented by adding elements to the cache with the "permanent" flag set.

	-P assumes that the first (and only) entry in the cache is the active branch and 'prunes' messages from other branches, and relies on the cache entry timing out if it's to ever use another branch.
	Put another way, it doesn't expect any permanent cache entries, so if the first entry is permanent, it's the only branch that will ever be forwarded to/from.
		see "if(Args.Prune && rcv_sender != trunk && cache_EPs.size() && rcv_sender != cache_EPs[0])" in MiniPlex.cpp
	
Fix Needed:
	Don't store permanent branches in the EndPointCache. Keep a separate collection of permanent branches instead.
	When forwarding packets, use a superset of the cache and permanent branches.
@neilstephens neilstephens added bug Something isn't working help wanted Extra attention is needed labels Aug 27, 2024
@neilstephens
Copy link
Owner Author

@jigjnasu, this is the issue I mentioned to you.

@jigjnasu
Copy link

Thanks @neilstephens !!!

@neilstephens
Copy link
Owner Author

Needed this fix urgently, so I fixed in 2acff67 . Sorry @jigjnasu , I'll tag you on the next 'help wanted' issue. Cheers.

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

No branches or pull requests

2 participants