[I] [BUG] [shenyu]</span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=notifications@shenyu.apache.org&q=from:%22via+GitHub%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">via GitHub</span></span></a></span> <span class="date"><a href="/search?l=notifications@shenyu.apache.org&q=date:20241015" rel="nofollow">Tue, 15 Oct 2024 20:05:58 -0700</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre> eye-gu opened a new issue, #5712: URL: <a rel="nofollow" href="https://github.com/apache/shenyu/issues/5712">https://github.com/apache/shenyu/issues/5712</a></pre><pre> ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior <img width="775" alt="image" src="<a rel="nofollow" href="https://github.com/user-attachments/assets/6f0449e4-6f8e-44ab-bffd-63b908916c37"">https://github.com/user-attachments/assets/6f0449e4-6f8e-44ab-bffd-63b908916c37"</a>;> If you want to create non singleton objects through the SPI mechanism, there may be bugs in multi-threaded scenarios. At positions 1 and 2 of the code, it is hoped that the first thread will remove at position 1 first, and the 'objectHolder' obtained by the second thread will be another instance. But if the first thread has not been removed yet and the second thread obtains the same 'objectHolder' instance with a non empty value, then the two threads obtaining the same instance object violates the non singleton goal 如果要通过spi机制创建非singleton的对象, 多线程场景下会存在bug. 代码的1和2处, 希望是第一个线程先在1处remove, 第二个线程获取的`objectHolder`就是另一个实例. 但可能第一个线程还没remove, 第二个线程拿到相同的`objectHolder`实例, 并且value不为空, 那么两个线程拿到相同的instance对象, 违背了非singleton的目标 ### Expected Behavior _No response_ ### Steps To Reproduce _No response_ ### Environment ```markdown ShenYu version(s): master ``` ### Debug logs _No response_ ### Anything else? _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@shenyu.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg31289.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="thrd12.html#31290">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="mail12.html#31290">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg31314.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email tSliceCur"><span class="subject">[I] [BUG] <title> [shenyu]</span> <span class="sender italic">via GitHub</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg31314.html">Re: [I] [BUG] spi create non singleton objects have bug in...</a></span> <span class="sender italic">via GitHub</span></li> <li class="icons-email"><span class="subject"><a href="msg33416.html">[I] [BUG] <title> [shenyu]</a></span> <span class="sender italic">via GitHub</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg33611.html">Re: [I] [BUG] fe show issue [shenyu]</a></span> <span class="sender italic">via GitHub</span></li> </ul></li> <li class="icons-email"><span class="subject"><a href="msg33475.html">[I] [BUG] <title> [shenyu]</a></span> <span class="sender italic">via GitHub</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg33479.html">Re: [I] [BUG] checkstyle 执行的预编译没有包含 pom 的 license head...</a></span> <span class="sender italic">via GitHub</span></li> <li class="icons-email"><span class="subject"><a href="msg33491.html">Re: [I] [BUG] checkstyle 执行的预编译没有包含 pom 的 license head...</a></span> <span class="sender italic">via GitHub</span></li> </ul></li> <li class="icons-email"><span class="subject"><a href="msg33634.html">[I] [BUG] <title> [shenyu]</a></span> <span class="sender italic">via GitHub</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg33635.html">Re: [I] [BUG] the tools of the mcp-server need to be r...</a></span> <span class="sender italic">via GitHub</span></li> <li class="icons-email"><span class="subject"><a href="msg33636.html">Re: [I] [BUG] the tools of the mcp-server need to be r...</a></span> <span class="sender italic">via GitHub</span></li> </ul> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" > <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value="[I] [BUG] <title> [shenyu]"> <input type="hidden" name="msgid" value="I_kwDOCGCHjs6aZ0So@gitbox.apache.org"> <input type="hidden" name="relpath" value="notifications@shenyu.apache.org/msg31290.html"> <input type="submit" value=" via GitHub "> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="notifications@shenyu.apache.org"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search notifications"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/notifications@shenyu.apache.org/">notifications - all messages</a></li> <li class="icons-about"><a href="/notifications@shenyu.apache.org/info.html">notifications - about the list</a></li> <li class="icons-expand"><a href="/search?l=notifications@shenyu.apache.org&q=subject:%22%5C%5BI%5C%5D+%5C%5BBUG%5C%5D+%3Ctitle%3E+%5C%5Bshenyu%5C%5D%22&o=newest&f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="msg31289.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg31314.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray">I_kwDOCGCHjs6aZ0So@gitbox.apache.org</li> </ul> </div> </body> </html>