Skip to content

Conversation

@sergio-bobillier
Copy link
Collaborator

The commit being reverted was supposed to fix an issue in the PropertiesFetcher class's #last method, however, that issue never existed to begin with.

The argument for the fix was that #last was sorting in descending order and then taking the last, which would effectively return the first, however, that is not true, because it is also asking Elasticsearch for a single document (by calling #size with its parameter set to 1).

Hence, Elasticsearch would return a single document, the last entry in the index (ordered chronologically). So the logic was correct to begin with.

This fixes the issue by reverting the changes introduced by #11

The commit being reverted was supposed to fix an issue in the
PropertiesFetcher class's #last method, however, that issue never
existed to begin with.

The argument for the fix was that #last was sorting in descending order
and then taking the last, which would effectively return the first,
however, that is not true, because it is also asking Elasticsearch for
a single document (by calling #size with its parameter set to 1).

Hence, Elasticsearch would return a single document, the last entry in
the index (ordered chronologically). So the logic was correct to begin
with.

This fixes the issue by reverting the changes introduced by #11
@sergio-bobillier sergio-bobillier merged commit ace225d into master Dec 12, 2025
2 checks passed
@sergio-bobillier sergio-bobillier deleted the sb-revert-9291f29 branch December 12, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants