-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add locking in cleanup #23
Conversation
d1de85a
to
649f6fc
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.
Nice!!
core/src/main/kotlin/io/github/bluegroundltd/outbox/TransactionalOutboxImpl.kt
Outdated
Show resolved
Hide resolved
810de71
to
b9dea5a
Compare
core/src/main/kotlin/io/github/bluegroundltd/outbox/TransactionalOutboxImpl.kt
Show resolved
Hide resolved
@@ -27,7 +27,7 @@ Transactional Outbox is published on `mavenCentral`. In order to use it just add | |||
|
|||
```gradle | |||
|
|||
implementation("io.github.bluegroundltd:transactional-outbox-core:1.0.0") | |||
implementation("io.github.bluegroundltd:transactional-outbox-core:2.0.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.
Should we also add some notes on how users should upgrade from 1.0.0
to 2.0.0
?
Or we should add this to the release tag after the release?
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.
Hmm, that's a nice idea!
In this case though, the upgrade only requires the addition of the locks provider call and the rename of the current function. The TransactionalBuilder
API is guiding the user via the fluent interface. I've also kinda updated the docs here.
Do you possibly mean adding a migration guide? Like
Upgrading from 1.x to 2.0.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.
9d4d65e 👀
Despite the fact that the store implementation could simply issue a `DELETE FROM outbox_item WHERE delete_after < now` it could also, fetch the to be deleted items and then try to delete them, which when run concurrently (w/o locks) could end up with errors. Thus, to be safe, we're introducing locks in cleanup, as well. We could use the same locks provider we're using for monitor, but that would serialize the monitor and cleanup runs, which is not required. [VR-3403]
cc3d366
to
16980d8
Compare
[VR-3403]
A breaking change since we change the interface of `TransactionalOutboxBuilder`. [VR-3403]
16980d8
to
fba98cb
Compare
Continuation of the outbox items cleanup epic. As per our spike, we've introduced a separate locks provider for cleanup. Please refer to the commit message for the rationale behind this.
Resolves [VR-3403].