Asynchronous initialization causing concurrently problem in DashboardApplication #705
Labels
kind/bug
Category issues or prs related to bug.
kind/enhancement
Category issues or prs related to enhancement.
Issue Description
Some racing problem occurred like ConcurrentModification on System.properties
Describe what happened (or what feature you want)
How to reproduce it (as minimally and precisely as possible)
Calling setProperty putting new keys into property set while InitExecutor.doInit is executed asynchronously.
Discussion
Asynchronism Supporting
We should declare whether asynchronism should be supported here.
We take the answer
YES
till someone submitted different opinions.Direct Cause of the Issue
The main method is shown below used by
Dashboard
booting up.The
InitExecutor.doInit()
is called in another thread when spring boot is starting.It may add new keys calling
System.setProperty
when booting. And we have the code below to load config from properties inSentinelConfig.loadProps
:Which we may use CopyOnWriteArraySet instead to walk through the values safely.
Is there any opinions, folks?
The text was updated successfully, but these errors were encountered: