gguptp commented on code in PR #224:
URL: 
https://github.com/apache/flink-connector-aws/pull/224#discussion_r2852381973


##########
flink-connector-aws/flink-connector-aws-kinesis-streams/src/main/java/org/apache/flink/connector/kinesis/source/reader/fanout/FanOutKinesisShardSubscription.java:
##########
@@ -85,8 +85,9 @@ public class FanOutKinesisShardSubscription {
 
     // Store the current starting position for this subscription. Will be 
updated each time new
     // batch of records is consumed
-    private StartingPosition startingPosition;
-    private FanOutShardSubscriber shardSubscriber;
+    // Cross-thread access: written by Netty thread in Subscriber#onNext, read 
by Flink main thread in kinesis#subscribeToShard.
+    private volatile StartingPosition startingPosition;
+    private volatile FanOutShardSubscriber shardSubscriber;

Review Comment:
   i dont think these need to be volatile since they are getting populated by 
the reader



-- 
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]

Reply via email to