scwhittle commented on code in PR #37007:
URL: https://github.com/apache/beam/pull/37007#discussion_r2598483206
##########
sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/read/UnboundedSolaceReader.java:
##########
@@ -64,7 +64,7 @@ class UnboundedSolaceReader<T> extends UnboundedReader<T> {
* Queue to place advanced messages before {@link #getCheckpointMark()} is
called. CAUTION:
* Accessed by both reader and checkpointing threads.
*/
- private final Queue<BytesXMLMessage> safeToAckMessages = new
ConcurrentLinkedQueue<>();
+ private Queue<BytesXMLMessage> safeToAckMessages = new
ConcurrentLinkedQueue<>();
Review Comment:
I don't think this needs to be a member variable anymore
##########
sdks/java/io/solace/src/main/java/org/apache/beam/sdk/io/solace/read/UnboundedSolaceReader.java:
##########
@@ -190,6 +190,7 @@ public Instant getWatermark() {
@Override
public UnboundedSource.CheckpointMark getCheckpointMark() {
+ safeToAckMessages = new ConcurrentLinkedQueue<>();
Review Comment:
I don't think you need the concurrentqueue anymore, and could perhaps just
copy to an immutablelist or even pass recievedmessages to the checkpoint and
then assign a new deque to receivedmessages.
--
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]