-
Notifications
You must be signed in to change notification settings - Fork 223
improve: thread-safe idempotent dynamic informer event source start #2174
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
Conversation
Can you elaborate on what this changes, please? |
Converted it to draft (meant it that way originally), until not finished. The reason for this is related to dynamic registration, if in a reconciliation multiple event sources are registered dynamically possible of same name from different thread (and also different type), it is hard to make that efficient ATM. Thus to not make all the threads possibly wait in the synchronized block of here. One way to do this si to query if the ES is already registered. But if registered does not mean it is started. By this change, calling the start method should ensure that it is started (in a thread-safe way) and also simultaneously waiting for the other thread if that is starting the event source. We can look on this as a lock striping. |
3212130
to
4ae0266
Compare
this will allow to multiple threads wait idempotently for the start of an informer event source Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Attila Mészáros <csviri@gmail.com>
Signed-off-by: Attila Mészáros <csviri@gmail.com>
247a58f
to
ac65a28
Compare
…2174) * imrove: thread-safe idempotent informer event source start this will allow to multiple threads wait idempotently for the start of an informer event source Signed-off-by: Attila Mészáros <csviri@gmail.com> * improvements on dynamic registration Signed-off-by: Attila Mészáros <csviri@gmail.com> * signing Signed-off-by: Attila Mészáros <csviri@gmail.com> * decoration Signed-off-by: Attila Mészáros <csviri@gmail.com> * format Signed-off-by: Attila Mészáros <csviri@gmail.com> * minor changes Signed-off-by: Attila Mészáros <csviri@gmail.com> --------- Signed-off-by: Attila Mészáros <csviri@gmail.com>
…2174) Signed-off-by: Attila Mészáros <csviri@gmail.com>
…2174) Signed-off-by: Attila Mészáros <csviri@gmail.com>
this will allow to multiple threads wait idempotently for the start of an informer event source