-
Notifications
You must be signed in to change notification settings - Fork 230
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
Creation of thing's policy is atomic with creation the of thing itself #1581
Creation of thing's policy is atomic with creation the of thing itself #1581
Conversation
@thjaeckle can you take a look when you can please. |
Signed-off-by: Stanchev Aleksandar <aleksandar.stanchev@bosch.io> Signed-off-by: Stanchev Aleksandar <aleksandar.stanchev@bosch.io>
51a0043
to
77b1c03
Compare
@alstanchev I will take a look soon. |
...in/java/org/eclipse/ditto/internal/utils/persistentactors/AbstractPersistenceSupervisor.java
Show resolved
Hide resolved
...ervice/src/main/java/org/eclipse/ditto/things/service/enforcement/RollbackCreatedPolicy.java
Outdated
Show resolved
Hide resolved
...ervice/src/main/java/org/eclipse/ditto/things/service/enforcement/RollbackCreatedPolicy.java
Outdated
Show resolved
Hide resolved
...ervice/src/main/java/org/eclipse/ditto/things/service/enforcement/RollbackCreatedPolicy.java
Outdated
Show resolved
Hide resolved
...ervice/src/main/java/org/eclipse/ditto/things/service/enforcement/RollbackCreatedPolicy.java
Outdated
Show resolved
Hide resolved
...ervice/src/main/java/org/eclipse/ditto/things/service/enforcement/RollbackCreatedPolicy.java
Outdated
Show resolved
Hide resolved
...s/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingPolicyCreated.java
Outdated
Show resolved
Hide resolved
...s/service/src/main/java/org/eclipse/ditto/things/service/enforcement/ThingPolicyCreated.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingSupervisorActor.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingSupervisorActor.java
Outdated
Show resolved
Hide resolved
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.
I added a first round of review comments.
.../src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingSupervisorActor.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/eclipse/ditto/things/service/persistence/actors/ThingSupervisorActor.java
Show resolved
Hide resolved
Signed-off-by: Stanchev Aleksandar <aleksandar.stanchev@bosch.io>
01737fb
to
594ac98
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.
Hey @alstanchev
That looks great - I had a look at the changes + the tests and are confident that improves resiliency a lot.
Good stuff 👍
This PR adds atomic behaviour to the creation of thing and its policy.
In the rare case of failing to create a thing, its policy will be rolled back (deleted) in order to not fail create retry.