fix plugin_id for anonymous extentsion and invalid input type #1939
+132
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
问题一:
非法的 input 没有报错,error 被吞了
问题二:
当流水线内,有多个主插件,且使用多个匿名拓展插件时,pluginid 计算有问题,可能会冲突,因为每次都会把主插件的 id 去赋值 logstore 中的一个 id 原子变量。
例子:
输入:
flusher_http/1
flusher_http/2
输出:
flusher_http/1
flusher_http/2
出现了两个ext_b/3,而 pluginRunner 中用extension 存储时 map,key为 PluginTypeWithID,重叠了。导致流水线热更新/退出时,没有执行所有插件的Stop函数,资源泄露了
修复后输出:
flusher_http/1
flusher_http/2