Skip to content
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

GH-8898: method to clear queue in AbstractRemoteFileStreamingMessageS… #8899

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kkosiacki
Copy link

This Pull Request is fixing problem describe in GH-8898

@pivotal-cla
Copy link

@kkosiacki Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@kkosiacki Thank you for signing the Contributor License Agreement!

Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new API has also to be mentioned in the whats-new.adoc.
You also can talk about it in the rotating-server-advice.adoc.

Thanks

/**
* Clear internal queue of listed files..
*/
public void clearUnprocessedFilesQueue() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I cannot imaging the scenario when it is necessary, but let's give it a more meaningful name like clearFetchedCache() and some good Javadoc, plus @since 6.3 and your name to the @author list of the affected classes.

I think another fix (separate issue/PR) must be done in the StandardRotationPolicy to enforce setMaxFetchSize(1) when mode is fair. Otherwise that fetched cache really does not make sense since we have just rotated to another dir and (possible) session factory. So, we would expect fresh file for that condition.


import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No asterisk imports.

See if spring-framework.xml in the src/idea or similar in eclipse can help you to re-align your IDE with our code style.

Copy link
Member

@artembilan artembilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the fix for this issue: #8967.

Might be that is enough for your use-case and we don't need to do anything else?

Thanks

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.

None yet

3 participants