-
Notifications
You must be signed in to change notification settings - Fork 68
remove id caches #1283
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: main
Are you sure you want to change the base?
remove id caches #1283
Conversation
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com>
6f52e48 to
5989c62
Compare
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com>
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com>
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com>
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com>
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com>
| func (p *Provider) RegisterVerifier(ctx context.Context, identity driver.Identity, v driver.Verifier) error { | ||
| if v == nil { | ||
| return errors.New("invalid verifier, expected a valid instance") | ||
| } |
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.
it looks like this function is not really needed anymore. I would start an investigation on the callers of this function. Maybe we can save further cycles.
| if err != nil { | ||
| return nil, errors.Wrapf(err, "failed deserializing identity for signer [%s]", identity) | ||
| } | ||
|
|
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 think we said to cache only the identity whose type is x509, no?
If we still cache the signers and the cache is only of size 5 there will be even more contention, no?
| if setAlias { | ||
| p.signers.Add(aliasID, entry) | ||
| } | ||
| } |
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.
we are still caching any signer no matter the identity type. This will generate even more contention on the signers cache given its new size (5)
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.
left comments, thanks.
remove id caches