davsclaus commented on code in PR #27794:
URL: https://github.com/apache/camel/pull/27794#discussion_r4266924281
##########
components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsConsumer.java:
##########
@@ -51,6 +51,10 @@ public class GridFsConsumer extends DefaultConsumer
implements Runnable {
private final GridFsEndpoint endpoint;
private volatile ScheduledExecutorService taskExecutor;
private volatile ExecutorService executor;
+ // the upload date of the newest file that was routed: a poll only asks
for the files uploaded after it.
+ // Kept between the polls. Two threads use it: run() sets the start value
on the thread of the executor,
+ // before it schedules the polls; the polls then read and move it on the
thread of the taskExecutor.
+ private volatile Date fromDate;
Review Comment:
Question: this field now also narrows the query of
`TimeStampAndFileAttribute` and `PersistentTimestampAndFileAttribute`. Those
two did not route files twice on main, because of the attribute filter.
`uploadDate` is set by the uploading client at `close()` (client clock, before
the insert). So a file that becomes visible after a newer one was routed, but
has an older `uploadDate`, is now skipped by those strategies.
Is that intended (it restores the pre-3.13 semantics)? If yes, a sentence in
the upgrade-guide entry would help. If not, the date could stay at its start
value when `usesAttribute` is true.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]