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
ISPN-7990 Provide a way to remove an entry from all indexes #5279
Conversation
@karesti Once you have the test to reproduce the issue of lack of values in the context during topology change, you can test against this branch. |
@gustavonalle Needs rebase. |
LGTM, @anistor could you bless this? |
Sure, I'll have a look after the meeting. |
Rebased |
* Remove entries from all indexes by key | ||
*/ | ||
void removeFromIndexes(TransactionContext transactionContext, Object key) { | ||
transactionContext = transactionContext == null ? makeTransactionalEventContext() : transactionContext; |
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.
Assigning same value to itself is a bit strange. Why not do it like if (transactionContext == null) { transactionContext = makeTransactionalEventContext(); }
?
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 used everywhere in the QI
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.
Indeed, and it looks a bit silly. Let's leave like that in the name of tradition :)
@@ -31,4 +31,7 @@ | |||
* @return collection of Work instances | |||
*/ | |||
Collection<Work> createPerEntityWorks(Object entity, Serializable id, WorkType workType); | |||
|
|||
Collection<Work> createPerEntityIdWorks(Serializable id, IndexedTypeIdentifier entityType, WorkType workType); |
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.
A bit of javadoc would be nice.
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.
ok. Will change a bit this method, it does not need to return a collection
@@ -9,6 +9,8 @@ | |||
import java.util.Set; |
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.
A bit too much javadoc reformatting.
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 came from the "official" formatter unfortunately. Should we avoid in general to reformat comments?
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 we don't change any content, then better not reformat them.
Updated. |
Integrated in master. Thanks @gustavonalle ! |
https://issues.jboss.org/browse/ISPN-7990