-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve discovery scalabiltiy #389
Conversation
beecce7
to
2968359
Compare
2968359
to
6f607d2
Compare
"strconv" | ||
"testing" | ||
) | ||
|
||
func TestMain(m *testing.M) { | ||
Log = logger.New("discoveryTest", "discoveryTest", "/dev/null") | ||
Log.SetLogLevel(logger.ERROR) | ||
Pools = make(map[string]*Pool) | ||
StateDirectoryPath = path.Join(os.TempDir(), "server_state_bench") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nicer if we stored all /tmp
tests in some more defined way, so for example all tests would be in /tmp/paranoid-tests/$component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would definitely be better. You should make an issue, I doubt we will end up fixing it before the end of the sprint though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a issue for it: #401
LGTM |
Also add locking and unlocking to avoid threading issues. Locking both for all pools when adding a pool per pool in general.
Add and remove operations are now O(SizeOfPool), not O(TotalNodes).