-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add slice queries to Persistence TestKit #30995
Conversation
* to make it feature comatible with currentEventsByTag * simplifies some usage in downstream projects
* to make it feature comatible with the tagged queries * simplifies some usage in downstream projects
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.
Don't know much about the DurableState part of it but at least the rest LGTM.
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.
Mostly looks good but there is a concurrency issue.
|
||
Source(store.values.toVector.filter(bySliceFromOffset).sortBy(_.globalOffset)) | ||
.concat(changesSource) | ||
.filter(bySliceFromOffsetNotDeleted) |
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.
This accesses mutable state from some other thread than the synchronized method call. Perhaps capturing the store as it was when the method was called is best? If not, make the store
field volatile?
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.
@johanandren thanks, fixed in b2bb9ef
Split in two commits if you prefer to review them separately.