Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
INT-4560: Fix Race in FileSystemPersistentAOFLF
JIRA: https://jira.spring.io/browse/INT-4560 Reproduced and tested with ```java @SpringBootApplication public class So53521593Application { private static final Logger logger = LoggerFactory.getLogger(So53521593Application.class); public static void main(String[] args) { SpringApplication.run(So53521593Application.class, args); } @bean public IntegrationFlow flow() { ExecutorService exec = Executors.newFixedThreadPool(10); return IntegrationFlows.from(Files.inboundAdapter(new File("/tmp/foo")).filter( new MyFilter(new SimpleMetadataStore(), "foo")), e -> e.poller(Pollers.fixedDelay(5, TimeUnit.SECONDS) .maxMessagesPerPoll(10))) .channel(MessageChannels.executor(exec)) .<File>handle((p, h) -> { try { p.delete(); logger.info(p.toString()); Thread.sleep(10_000); } catch (InterruptedException e1) { Thread.currentThread().interrupt(); } return null; }) .get(); } } class MyFilter extends FileSystemPersistentAcceptOnceFileListFilter { public MyFilter(ConcurrentMetadataStore store, String prefix) { super(store, prefix); } @OverRide protected long modified(File file) { long modified = super.modified(file); System.out.println(modified); return modified; } } ``` **cherry-pick to 5.0.x, 4.3.x**
- Loading branch information
39fef2c
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.
When this change will be available in the Maven central?
39fef2c
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.
Right now we are in release process for
5.0.10
and5.1.1
versions.Hopefully there are going to appear in Maven Central in a couple hours.
If you talk about
4.3.19
, then it's not going to happen today.You will need to copy/paste a fix into your own local
FileSystemPersistentAcceptOnceFileListFilter
class and use it accordingly in the channel adapters.39fef2c
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.
Thanks