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

begin can't do Unregister requests without Register requests #1515

Closed
NikitaSkrynnik opened this issue Sep 25, 2023 · 1 comment
Closed

begin can't do Unregister requests without Register requests #1515

NikitaSkrynnik opened this issue Sep 25, 2023 · 1 comment
Assignees

Comments

@NikitaSkrynnik
Copy link
Contributor

NikitaSkrynnik commented Sep 25, 2023

Current Behavior

We can see this bug when we scale registry-k8s, for example. If one of the registries receives an Unregister request from an endpoint but this registry didn't receive Register request from the same endpoint previously, the registry just skips the Unregister request. This happens because the registry can't find an eventFactory for this endpoint. Here is the code where it happens: Code.

The situation is the same with Close request if we scale nsmgr for example. Code

Expected Behavior

The registry should delete the endpoint from etcd even if it couldn't find an eventFactory for this endpoint.

Steps to Reproduce

The steps can be found in this issue: networkservicemesh/sdk-k8s#456

@NikitaSkrynnik NikitaSkrynnik self-assigned this Sep 25, 2023
@NikitaSkrynnik NikitaSkrynnik changed the title Bug with begin on Unregister and Close requests Bug in begin on Unregister and Close requests Oct 17, 2023
@NikitaSkrynnik NikitaSkrynnik changed the title Bug in begin on Unregister and Close requests Bug in begin on Unregister requests Oct 24, 2023
@NikitaSkrynnik
Copy link
Contributor Author

Performance comparison between recursive version of begin and channel version of begin:

goos: linux
goarch: amd64
cpu: 12th Gen Intel(R) Core(TM) i7-12700KF
                                        │ beginchannels  │              beginrecursive              │
                                        │     sec/op     │     sec/op      vs base                  │
Begin_RegisterSameIDs-20                  0.006271n ± 4%   0.004997n ± 2%   -20.31% (n=500)
Begin_UnregisterSameIDs-20                0.004392n ± 4%   0.005649n ± 2%   +28.63% (p=0.000 n=500)
Begin_RegisterUnregisterSameIDs-20        0.008200n ± 2%   0.010225n ± 2%   +24.70% (p=0.000 n=500)
Begin_RegisterDifferentIDs-20             0.003916n ± 4%   0.006073n ± 2%   +55.08% (p=0.000 n=500)
Begin_UnregisterDifferentIDs-20           0.003423n ± 4%   0.005814n ± 2%   +69.81% (p=0.000 n=500)
Begin_RegisterUnregisterDifferentIDs-20   0.006937n ± 6%   0.019170n ± 4%  +176.34% (p=0.000 n=500)
geomean                                   0.005253n        0.007617n        +45.02%

@NikitaSkrynnik NikitaSkrynnik changed the title Bug in begin on Unregister requests begin can't do Unregister requests without Register requests Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants