davsclaus commented on code in PR #27670:
URL: https://github.com/apache/camel/pull/27670#discussion_r4240437004
##########
components/camel-google/camel-google-storage/src/main/java/org/apache/camel/component/google/storage/GoogleCloudStorageConsumer.java:
##########
@@ -169,12 +173,44 @@ protected Queue<Exchange> createExchanges(List<Blob>
blobList) {
}
} catch (Exception e) {
LOG.warn("Error getting object due: {}", e.getMessage(), e);
+ // none of the objects of this poll is processed
+ releaseInProgress(answer);
throw e;
}
return answer;
}
+ private void addExchange(Blob blob, String key, Queue<Exchange> answer) {
+ // skip the object if an exchange of a previous poll is still
processing it
+ if (!inProgress.add(key)) {
Review Comment:
Same window as in the google-mail PR: snapshot the set before listing
(`Set<String> busy = Set.copyOf(inProgress);`) and skip keys that were in
flight at listing time.
##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc:
##########
@@ -3692,6 +3692,14 @@ When `downloadFileName` is fully dynamic and has no
static directory prefix (for
`downloadFileName=${file:name}`), a relative destination must stay within the
working directory. An absolute
destination that comes from the route's own expression is not confined.
+=== camel-google-storage - objects whose exchange is in flight
Review Comment:
There's already a `=== camel-google-storage` section a few lines above (line
3672); please fold this text into it rather than adding a second heading.
--
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]