-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Create completely new results for server refreshing #3032
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
base: master
Are you sure you want to change the base?
Conversation
|
Besides the complexity, I'm worried about about data races and slice corruption. That looks risky. Maybe this is correct but I'm unable to understand that code. |
dd21d52 to
2e8de62
Compare
|
Yes, we use slice, and the working model is:
type RegisteredServer struct {
name string
stamp stamps.ServerStamp
description string
}type ServerStamp struct {
ServerAddrStr string
ServerPk []uint8
Hashes [][]uint8
ProviderName string
Path string
Props ServerInformalProperties
Proto StampProtoType
}
type ServerInformalProperties uint64
type StampProtoType uint8
Outgoing requests ( Slices of slices should be correctly tracked by go. The principle is: For example: dnscrypt-proxy/dnscrypt-proxy/proxy.go Line 413 in 9b1b1e2
dnscrypt-proxy/dnscrypt-proxy/serversInfo.go Lines 249 to 250 in 9b1b1e2
As
For the first round, For the following rounds, Elements of I haven't found any data races or slice corruption in the new solution. Could you point them out to me? I'll make improvements. |
|
This is too complicated, and I won't be able to maintain that. Make she feel like I should abandon the project. |
|
😲 |
2e8de62 to
eeb3b6e
Compare
|
I've split the changes into 3 commits. One of them is a new PR #3033. |
Exclude servers/relays that have been removed from the sources, had their privacy level lowered, or IPv6 has became unavailable while enabled IPv6 servers.
Exclude servers/relays that have been removed from the sources, had their privacy level lowered, or IPv6 has became unavailable while enabled IPv6 servers.
eeb3b6e to
54d59fb
Compare
|
Optimize for clear logic. |
Exclude servers/relays that have been removed from the sources, had their privacy level lowered, or IPv6 has became unavailable.
Don't need to shuffle
proxy.registeredServers, update/10min; shuffleServersInfo.registeredServersis enough.PS: Distinguishing updating existing and adding new items increases complexity.