Skip to content

Commit

Permalink
Fix hybrid query loading of expired entities (infinispan#13194)
Browse files Browse the repository at this point in the history
  • Loading branch information
fax4ever authored and pruivo committed Dec 10, 2024
1 parent 40a18d4 commit a7b0347
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ protected ClosableIteratorWithCount<ObjectFilter.FilterResult> getInternalIterat
}

private ObjectFilter.FilterResult filter(EntityEntry<Object, S> entry) {
ObjectFilter.FilterResult filter = objectFilter.filter(entry.key(), entry.value(), entry.metadata());
S value = entry.value();
if (value == null) {
// A value can be null in case of expired entity,
// there is a moment in which the index state and the data state are not aligned,
// in this case it is safe to return a null value result:
return null;
}

ObjectFilter.FilterResult filter = objectFilter.filter(entry.key(), value, entry.metadata());
String[] projection = objectFilter.getProjection();
if (projection == null) {
return filter;
Expand Down

0 comments on commit a7b0347

Please sign in to comment.