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 plugin_id for anonymous extentsion and invalid input type #1939

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

shunjiazhu
Copy link
Contributor

@shunjiazhu shunjiazhu commented Dec 2, 2024

问题一:
非法的 input 没有报错,error 被吞了

问题二:
当流水线内,有多个主插件,且使用多个匿名拓展插件时,pluginid 计算有问题,可能会冲突,因为每次都会把主插件的 id 去赋值 logstore 中的一个 id 原子变量。

例子:

输入:
flusher_http/1

  • ext_a
  • ext_b
    flusher_http/2
  • ext_b
  • ext_a

输出:
flusher_http/1

  • ext_a/2
  • ext_b/3
    flusher_http/2
  • ext_b/3
  • ext_a/4
    出现了两个ext_b/3,而 pluginRunner 中用extension 存储时 map,key为 PluginTypeWithID,重叠了。导致流水线热更新/退出时,没有执行所有插件的Stop函数,资源泄露了

修复后输出:
flusher_http/1

  • ext_a/1_1
  • ext_b/1_2
    flusher_http/2
  • ext_b/2_1
  • ext_a/2_2

Change-Id: I8c360e1572b5f3ef801396578aed574cbcb162c5
Change-Id: I77493c6ee4c1d6b823e96991d7afd6a80c37bf9d
@shunjiazhu shunjiazhu changed the title fix plugin_id for anonymous extentsion fix plugin_id for anonymous extentsion and invalid input type Dec 3, 2024
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.

1 participant