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

Fix name collision in indexer cache (#2645) #2669

Merged
merged 1 commit into from
Feb 2, 2021
Merged

Fix name collision in indexer cache (#2645) #2669

merged 1 commit into from
Feb 2, 2021

Conversation

mathewc
Copy link
Member

@mathewc mathewc commented Feb 2, 2021

Fix for #2645. As noted in the issue, the bug was introduced in 76d44ca when a method name cache was introduced.

@@ -34,7 +34,12 @@ public void Add(IFunctionDefinition function, FunctionDescriptor descriptor, Met
_functionsByMethod.Add(method, function);

// For compat, accept either the short name ("Class.Name") or log name (just "Name")
_functionsByName.Add(descriptor.LogName, function);
if (!_functionsByName.ContainsKey(descriptor.LogName))
Copy link
Member Author

@mathewc mathewc Feb 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix retains the previous logic of first one wins that existed before cache was added. See previous logic here.

@mathewc mathewc requested a review from brettsam February 2, 2021 20:41
@mathewc mathewc merged commit 3666192 into dev Feb 2, 2021
@mathewc mathewc deleted the indexer-fix branch February 2, 2021 21:32
@mathewc mathewc assigned mathewc and unassigned mathewc Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants