-
Notifications
You must be signed in to change notification settings - Fork 14
[chore] improve error handling when invoking 'start' twice #418
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
f4cea47
to
8e9c491
Compare
@@ -0,0 +1,54 @@ | |||
/* | |||
* Licensed to the Apache Software Foundation (ASF) under one or more | |||
* license agreements; and to You under the Apache License, version 2.0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you switch the source header to the standard ASF header? https://github.com/apache/pekko/blob/main/project/AddMetaInfLicenseFiles.scala#L1-L16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, done!
Currently, when you run `start` twice with the same config, it will start the PekkoManagement extension once and return the same `Uri`. This is a convenient 'idempotence'. However, previously this would silently ignore the second invocation if the parameters of the two calls were different, leading to a race condition. The change in this commit adds error handling so that if the second invocation uses different parameters, it will fail the second call with a sensible error message.
8e9c491
to
e484ab1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@raboof if you have time, could you back port this to 1.0.x branch? |
Currently, when you run `start` twice with the same config, it will start the PekkoManagement extension once and return the same `Uri`. This is a convenient 'idempotence'. However, previously this would silently ignore the second invocation if the parameters of the two calls were different, leading to a race condition. The change in this commit adds error handling so that if the second invocation uses different parameters, it will fail the second call with a sensible error message.
Sure, #420 |
Currently, when you run `start` twice with the same config, it will start the PekkoManagement extension once and return the same `Uri`. This is a convenient 'idempotence'. However, previously this would silently ignore the second invocation if the parameters of the two calls were different, leading to a race condition. The change in this commit adds error handling so that if the second invocation uses different parameters, it will fail the second call with a sensible error message.
Currently, when you run `start` twice with the same config, it will start the PekkoManagement extension once and return the same `Uri`. This is a convenient 'idempotence'. However, previously this would silently ignore the second invocation if the parameters of the two calls were different, leading to a race condition. The change in this commit adds error handling so that if the second invocation uses different parameters, it will fail the second call with a sensible error message.
Currently, when you run
start
twice with the same config, it will start the PekkoManagement extension once and return the sameUri
. This is a convenient 'idempotence'. However, previously this would silently ignore the second invocation if the parameters of the two calls were different, leading to a race condition.The change in this commit adds error handling so that if the second invocation uses different parameters, it will fail the second call with a sensible error message.